对于最大信息系数的介绍:https://blog.csdn.net/u014271612/article/details/51781250
python实现最大信息系数:
import numpy as np
from minepy import MINE
def print_stats(mine):
print("MIC", mine.mic())
x = np.linspace(0, 1, 1000)
y = np.sin(10 * np.pi * x) + x
mine = MINE(alpha=0.6, c=15)
mine.compute_score(x, y)
print("Without noise:")
print_stats(mine)
np.random.seed(0)
y +=np.random.uniform(-1, 1, x.shape[0]) # add some noise
mine.compute_score(x, y)
print("With noise:")
print_stats(mine)