scikit-learn-contrib / MAPIE

A scikit-learn-compatible module to estimate prediction intervals and control risks based on conformal predictions.
https://mapie.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
1.2k stars 99 forks source link

Allow `MapieRegressor` to use any split strategy #385

Closed thibaultcordier closed 6 months ago

thibaultcordier commented 6 months ago

Is your feature request related to a problem? Please describe. Split-CP is only available with "split" keyword or ShuffleSplit class of scikit-learn.

Describe the solution you'd like Propose more compatible split BaseCrossValidator/BaseShuffleSplit.

Describe alternatives you've considered In practice, we need to use the predictions aggregation for cross-CPs and not for split-CPs. All you need to do is find out the number of splits using the get_n_splits method to know whether it's a split or a cross.