skada
skada copied to clipboard
[API] fit, predict and other functions should accept X,y,smaple_weight as first parameters by default
In order to stay compatible with skleran
API we want all estimatoer (and Adapters) to have functions that accept unnamed sample_weight
by defalult.
For the moment we have for Adapter and DAEstimator:
@abstractmethod
def fit(self, X, y=None, sample_domain=None, *, sample_weight=None):
"""Fit adaptation parameters"""
I suggest we change it to
@abstractmethod
def fit(self, X, y=None, sample_weight=None sample_domain=None, *):
"""Fit adaptation parameters"""
that will allow to do things like
model.fit( X, y, sample_weight, sample_domain):
the named sample_domain will still be necessary for pipelines