如果我从scikit libary运行dendrogram
:
from scipy.cluster.hierarchy import linkage, dendrogram
# ...
X = np.asarray(X)
Z = linkage(X, 'single', 'correlation')
plt.figure(figsize=(16,8))
dendrogram(Z, color_threshold=0.7)
我的ipython笔记本中输出了{em>一吨<{em} print
输出:
{'color_list': ['g',
'r',
'c',
'm',
'y',
...
0.70780175324891315,
0.70172263980890581],
[0.0, 0.54342622932769225, 0.54342622932769225, 0.0],
[0.0, 0.46484932243120658, 0.46484932243120658, 0.0],
...
177,
196,
82,
19,
108]}
如何禁用此功能?我只对实际的树形图感兴趣。
答案 0 :(得分:1)
将打印重定向为空:
request v2.74.0