ML之MIC:利用某数据集计算机最大信息系数MIC并可视化MIC矩阵热图及其代码实现
ML之MIC:利用某数据集计算机最大信息系数MIC并可视化MIC矩阵热图及其代码实现
利用某数据集计算机最大信息系数MIC并可视化MIC矩阵热图及其代码实现
实现结果
正在执行B盘的数据
0 1 2 3 4 5 6 0 0.993748 0.992363 0.865935 0.158754 0.199621 0.238159 0.859997
1 0.992363 0.998222 0.584723 0.302727 0.307473 0.298183 0.695466
2 0.865935 0.584723 0.999999 0.801459 0.805825 0.793084 0.935439
3 0.158754 0.302727 0.801459 0.999574 0.999574 0.965256 0.963887
4 0.199621 0.307473 0.805825 0.999574 0.999999 0.968664 0.966409
5 0.238159 0.298183 0.793084 0.965256 0.968664 0.999999 0.935723
6 0.859997 0.695466 0.935439 0.963887 0.966409 0.935723 0.999710
7 0.632709 0.484949 0.818616 0.963887 0.966409 0.915654 0.995471
8 0.241095 0.230026 0.545492 0.530788 0.669366 0.473332 0.486489
9 0.368982 0.289529 0.250506 0.138713 0.215880 0.161387 0.137730
10 0.423532 0.331815 0.331008 0.253744 0.262192 0.261714 0.295448
11 0.841959 0.826301 0.772081 0.173843 0.239098 0.253886 0.781008
7 8 9 10 11
0 0.632709 0.241095 0.368982 0.423532 0.841959
1 0.484949 0.230026 0.289529 0.331815 0.826301
2 0.818616 0.545492 0.250506 0.331008 0.772081
3 0.963887 0.530788 0.138713 0.253744 0.173843
4 0.966409 0.669366 0.215880 0.262192 0.239098
5 0.915654 0.473332 0.161387 0.261714 0.253886
6 0.995471 0.486489 0.137730 0.295448 0.781008
7 0.999864 0.473332 0.108656 0.261138 0.573823
8 0.473332 0.995335 0.275280 0.295224 0.190111
9 0.108656 0.275280 0.999993 0.901033 0.408306
10 0.261138 0.295224 0.901033 0.999993 0.374089
11 0.573823 0.190111 0.408306 0.374089 0.999935
实现代码
相关文章:ML之MIC:利用某数据集计算机最大信息系数MIC并可视化MIC矩阵热图及其代码实现
from minepy import MINE
import seaborn as sns
def MIC_matirx_ShowHeatMap(DataFrame):
colormap = plt.cm.RdBu
ylabels = DataFrame.columns.values.tolist()
f, ax = plt.subplots(figsize=(14, 14))
ax.set_title('MIC Matirx HeatMap')
sns.heatmap(DataFrame.astype(float),
cmap=colormap,ax=ax,annot=True,
yticklabels=ylabels,xticklabels=ylabels)
plt.show()
MIC_matirx_ShowHeatMap(data_MIC_matirx)
赞 (0)