Skip to content

Commit 506c25a

Browse files
committed
ENH: improve jackknife docstring
1 parent f1b0707 commit 506c25a

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

mapie_v1/regression.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -567,16 +567,19 @@ class JackknifeAfterBootstrapRegressor:
567567
be provided.
568568
569569
method : str, default="plus"
570-
The method used for jackknife-after-bootstrap prediction. Options are:
571-
- "base": Based on the conformity scores from each bootstrap sample.
572-
- "plus": Based on the conformity scores from each bootstrap sample and
573-
the testing prediction.
574-
- "minmax": Based on the minimum and maximum conformity scores from
575-
each bootstrap sample.
570+
Jackknife-after-bootstrap method for prediction intervals:
571+
- "plus": Combines bootstrap conformity scores with test predictions.
572+
- "minmax": Minimum and maximum conformity scores from bootstrap samples.
576573
577-
n_bootstraps : int, default=100
578-
The number of bootstrap resamples to generate for the
579-
jackknife-after-bootstrap procedure.
574+
Note: The "base" method is not authorized and should not be used.
575+
576+
resampling : Union[int, Subsample], default=30
577+
Number of bootstrap resamples or an instance of `Subsample` for
578+
custom resampling strategy.
579+
580+
aggregation_method : str, default="mean"
581+
Aggregation method for predictions across bootstrap samples.
582+
Options: ["mean", "median"].
580583
581584
n_jobs : Optional[int], default=None
582585
The number of jobs to run in parallel when applicable.
@@ -763,14 +766,18 @@ def predict_set(
763766
X : ArrayLike
764767
Test data for prediction intervals.
765768
769+
minimize_interval_width : bool, default=False
770+
If True, minimizes the width of prediction intervals while
771+
maintaining coverage.
772+
766773
allow_infinite_bounds : bool, default=False
767774
If True, allows intervals to include infinite bounds
768775
if required for coverage.
769776
770777
Returns
771778
-------
772779
NDArray
773-
Prediction intervals of shape `(n_samples, 2)`,
780+
Prediction intervals of shape (n_samples, 2),
774781
with lower and upper bounds for each sample.
775782
"""
776783
_, intervals = self._mapie_regressor.predict(

0 commit comments

Comments
 (0)