8000 Pipeline score broken for unsupervised algorithms · Issue #4063 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Pipeline score broken for unsupervised algorithms #4063

@pmaher86

Description

@pmaher86

The score method for pipeline assigns y=None and always passes it to the score method of the final estimator, but some estimators (for instance KMeans) take only X. Is there a reason to use y=None instead of *args?

Reproducible by

import numpy as np,sklearn
from sklearn.pipeline import Pipeline
from sklearn.cluster import KMeans
X=np.random.rand(100,2)
p=Pipeline([('clf',KMeans(n_clusters=3))])
p.fit(X)
p.score(X)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0