Skip to content

Simplify sample_weights handling (internal refactoring)Β #753

@Valentin-Laurent

Description

@Valentin-Laurent

Release v1 has simplified the way sample_weights are passed as arguments (directly in fit_params).

We can simplify the fit methods of classes _MapieRegressor, _MapieQuantileRegressor and _MapieClassifier to include sample_weight directly in fit_params as well, thus removing the need of the specific _prepare_fit_params_and_sample_weight function and its usage in ConformalizedQuantileRegressor, CrossConformalRegressor, JackknifeAfterBootstrapRegressor and CrossConformalClassifier.

We can also most probably remove _fit_estimator (even for calibration), and replace its usage by a simple estimator.fit(X, y, **fit_params) (I believe the checks performed in this function are too specific and unnecessary once sample_weights are included in fit_params

Metadata

Metadata

Assignees

No one assigned

    Labels

    BacklogThis has a good chance to be implemented at some point.Contributors welcome πŸ‘‹πŸ»Especially relevant issue/PR for contributors to work on.Other or internalIf no other grey tag is relevant or if issue from the MAPIE team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions