probly.conformal_prediction.methods.jackknifeplus¶
Jackknife Conformal Prediction Methods.
Classes
|
Base class for resampling-based conformal prediction (Jackknife+ / CV+). |
|
Jackknife+ Classifier. |
|
Jackknife+ Regressor. |
- class probly.conformal_prediction.methods.jackknifeplus.JackknifeCVBase(model_factory, cv=None, random_state=None)[source]¶
Bases:
ConformalPredictorBase class for resampling-based conformal prediction (Jackknife+ / CV+).
- abstractmethod compute_scores(y_true, y_pred)[source]¶
Compute nonconformity scores based on true and predicted values.
- create_fold_assignments(x, y)[source]¶
Create fold assignments for each sample based on the CV strategy.
- class probly.conformal_prediction.methods.jackknifeplus.JackknifePlusClassifier(model_factory, cv=None, random_state=None, use_accretive=False, score_func=None)[source]¶
Bases:
JackknifeCVBase,ConformalClassifierJackknife+ Classifier.
- Parameters:
- static to_numpy(x)¶
Convert input to numpy array of floats.
- calibrate(x_cal, y_cal, alpha)¶
Calibrate the Jackknife+ / CV+ predictor.
- compute_scores(y_true, y_pred)[source]¶
Compute nonconformity scores based on true and predicted values.
- create_fold_assignments(x, y)¶
Create fold assignments for each sample based on the CV strategy.
- get_aligned_predictions(x_test)¶
Get predictions from each fold model aligned to original data order.
- class probly.conformal_prediction.methods.jackknifeplus.JackknifePlusRegressor(model_factory, cv=None, random_state=None, score_func=None, interval_func=None)[source]¶
Bases:
JackknifeCVBase,ConformalRegressorJackknife+ Regressor.
- Parameters:
- static to_numpy(x)¶
Convert input to numpy array of floats.
- calibrate(x_cal, y_cal, alpha)¶
Calibrate the Jackknife+ / CV+ predictor.
- compute_scores(y_true, y_pred)[source]¶
Compute nonconformity scores based on true and predicted values.
- create_fold_assignments(x, y)¶
Create fold assignments for each sample based on the CV strategy.
- get_aligned_predictions(x_test)¶
Get predictions from each fold model aligned to original data order.