probly.conformal_prediction.methods.cvplus¶
Cross-validation+ (CV+) implementation.
Classes
|
CV+ Classifier (Defaults to 5-Fold). |
|
CV+ Regressor (Defaults to 5-Fold). |
- class probly.conformal_prediction.methods.cvplus.CVPlusClassifier(model_factory, cv=5, random_state=None, use_accretive=False, score_func=None)[source]¶
Bases:
JackknifePlusClassifierCV+ Classifier (Defaults to 5-Fold).
- 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)¶
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.cvplus.CVPlusRegressor(model_factory, cv=5, random_state=None, score_func=None, interval_func=None)[source]¶
Bases:
JackknifePlusRegressorCV+ Regressor (Defaults to 5-Fold).
- 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)¶
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.