You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After some reads and tries I believe the matrix given behave as a distance matrix.
I think that It would be suitable to add this information: for example, this:
affinity : string or callable, default: “euclidean”
Metric used to compute the linkage. Can be “euclidean”, “l1”, “l2”, “manhattan”, “cosine”, or ‘precomputed’. If linkage is “ward”, only “euclidean” is accepted. If 'precomputed' a distance matrix is needed as input for the fit method.
instead of this:
affinity : string or callable, default: “euclidean”
Metric used to compute the linkage. Can be “euclidean”, “l1”, “l2”, “manhattan”, “cosine”, or ‘precomputed’. If linkage is “ward”, only “euclidean” is accepted.
Best regards and thanks for your wonderful work! =)
To be fair, all other mentioned possible values (euclidean for instance) are distance metrics. Therefore I'd assume it would be relatively clear that the method expects a distance metric. Anyhow, if we decide to change anything, it should be changed in all places where we take a distance/affinity function as input.
Having a glance at the hierarchical.py itself, I can see there are quite a few different versions we have there.
As a side note, the term affinity may be confusing for some people when used as a distance measure instead of similarity.
Activity
adrinjalali commentedon Feb 9, 2019
To be fair, all other mentioned possible values (euclidean for instance) are distance metrics. Therefore I'd assume it would be relatively clear that the method expects a distance metric. Anyhow, if we decide to change anything, it should be changed in all places where we take a distance/affinity function as input.
Having a glance at the
hierarchical.pyitself, I can see there are quite a few different versions we have there.As a side note, the term
affinitymay be confusing for some people when used as a distance measure instead of similarity.jnothman commentedon Feb 11, 2019