且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

解释SciPy的分层聚类树状图的输出? (也许发现了一个错误...)

更新时间:2022-12-30 18:49:06

icoorddcoordcolor_list描述的是链接,而不是叶子. icoorddcoord给出图中每个链接的拱形"(即上下U形或J形)的坐标,而color_list是这些拱形的颜色.在整个图中,icoord等的长度将比ivl的长度小1.

icoord, dcoord and color_list describe the links, not the leaves. icoord and dcoord give the coordinates of the "arches" (i.e. upside-down U or J shapes) for each link in a plot, and color_list is the color of those arches. In a full plot, the length of icoord, etc., will be one less than the length of ivl, as you have observed.

不要尝试将ivl列表与icoorddcoordcolor_list列表对齐.它们与不同的事物相关联.

Don't try to line up the ivl list with the icoord, dcoord and color_list lists. They are associated with different things.