8000 arguments to fit in "rolling your own estimator" · Issue #7142 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content 8000
arguments to fit in "rolling your own estimator" #7142
Closed
@amueller

Description

@amueller

It came up in #7136 that the dev docs are not super explicit what parameters should be passed to fit.
Basically, the rule is that should only be those that have shape n_samples and need to be sliced in cross-validation. The rest should go into __init__ (also maybe mention that cross-validation does allow this slicing).

For transform and predict we don't usually have parameters, though there could be times when that would be helpful, like thresholds for prediction / feature selection. We haven't really handled that consistently so far, maybe we should advise to generally avoid parameters to transform and predict, as people can always do estimator.set_params(stuff=1) or estimator.stuff = 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationEasyWell-defined and straightforward way to resolve

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0