Closed gagolews closed 4 years ago
Apply cummax on all elements up to the last positive one
for the remaining ones, apply cummax(abs(d))
this is not documented but cut_tree
needs this
# create the linkage matrix, see scipy.cluster.hierarchy.linkage
Z = np.column_stack((g.children_, g.distances_, g.counts_))
# correct for possible departures from ultrametricity:
Z[:,2] = genieclust.tools.cummin(Z[::-1,2])[::-1]
import scipy.cluster.hierarchy
scipy.cluster.hierarchy.dendrogram(Z)
plt.show()
cummin on reversed distances
Also make sure dentrograms are plotted correctly in the presence of noise points
Also add examples in the tutorials