Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

check_estimator assumes too much about 3rd-party estimators #16311

Copy link
Copy link
Closed
@kasparthommen

Description

@kasparthommen
Issue body actions

I am writing an estimator that I'd like to make compatible with scikit-learn. My estimator has a parameter/field called n_components. Note that the purpose/meaning/intent of this parameter is different from parameters of the same name of existing scikit-learn estimators (e.g. LinearDiscriminantAnalysis or LinearDiscriminantAnalysis).

When I run check_estimator() on my model it fais because check_estimator() modifies my n_components field in this piece of code

There are plenty more places in estimator_checks.py where estimators' n_components or n_clusters fields are being set to specific values without checking for estimator type. At the very least type checks should be added to all of those cases in a manner similar to this "ugly" piece of code.

Looks like this issue might be complementary to #6715 which deals with check_estimator() not being general enough.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.