Skip to content

LogisticRegressionCV score function should use scoring parameter in the constructor #8274

Closed
@kuangchen

Description

@kuangchen

Description

Currently, score() method returns the mean accuracy
https://github.com/scikit-learn/scikit-learn/blob/14031f6/sklearn/base.py#L324

which is different from the scoring function supplied by user in constructor:
https://github.com/scikit-learn/scikit-learn/blob/14031f6/sklearn/linear_model/logistic.py#L1500

This is confusing, because as a user I would expect score() to use the same scoring function specified.

Steps/Code to Reproduce

Versions

In [3]: scipy.__version__
Out[3]: '0.17.1'

In [4]: numpy.__version__
Out[4]: '1.11.1'

In [7]: sklearn.__version__
Out[7]: '0.18.1'

Metadata

Metadata

Assignees

No one assigned

    Labels

    EasyWell-defined and straightforward way to resolveSprintgood first issueEasy with clear instructions to resolvehelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions