Maximal Information Coefficient (MIC)最大互信息系数及python实现

对于最大信息系数的介绍: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)

 

上一篇:(数据科学学习手札23)决策树分类原理详解&Python与R实现


下一篇:socat管理haproxy配置 ssh-keygen -N '' -t rsa -q -b 2048