Skip to content

[AgglomerativeClustering] confusing parameter 'affinity' #13945

Closed
@ab-anssi

Description

@ab-anssi

The name of the parameter 'affinity' is misleading, since it does not correspond to similarity/affinity functions, but to distance functions.

Besides, the documentation for the parameter 'affinity' seems wrong.

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 (instead of a similarity matrix) is needed as input for the fit method.

If affinity="precomputed" a distance matrix, instead of a feature matrix (not a similarity matrix), is needed as input for the fit method ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions