8000 Q: why is the correlation metric commented in dist_metrics.pyx? · Issue #4213 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
10000
Q: why is the correlation metric commented in dist_metrics.pyx? #4213
Closed
@mvdoc

Description

@mvdoc

Hi,

in dist_metrics.pyx the correlation metric is commented, and the comment states that it is not a 'true' metric. While this is true as it doesn't satisfy the coincidence axiom, it is still helpful to have such a metric implemented in cython to speed up computations.

Also, note that the actual formula implemented in the commented code is incorrect. The returned value at the moment is

return (1. - x1Tx2) / sqrt(x1nrm * x2nrm)

but it should be instead

return 1. - (x1Tx2 / sqrt(x1nrm * x2nrm))

Thanks,
Matteo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0