Closed
Description
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