MAPIE's sample_weight vs sklearn's sample_weight in the fit method
#362
-
|
How do these parameters relate? self.mapie_regressor = MapieRegressor(estimator=self.model, method='plus', cv=5, random_state=self.seed)
self.mapie_regressor.fit(
X=self.X_train,
y=self.y_train,
sample_weight=self.weights
) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hello @CarlaFernandez, TL;DR: These parameters are the same for MAPIE and scikit-learn in Indeed, In other words, if you simply wrap MAPIE around your original model which relies on Some additionnal links:
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the confirmation! |
Beta Was this translation helpful? Give feedback.
Hello @CarlaFernandez,
TL;DR: These parameters are the same for MAPIE and scikit-learn in
fitmethod.Indeed,
MapieRegressoror other MAPIE classes have been implemented to be scikit-learn compatible with commonly used terms. In particular,sample_weightis used in MAPIE specifically in the utility functionfit_estimatorthat depends on your model estimator.In other words, if you simply wrap MAPIE around your original model which relies on
sample_weight, it will be the same internally (direct transmission ofsample_weightparameter).Some additionnal links: