API¶
SelfCalibratingConformalPredictor¶
Use this class when you already have a point predictor for y and want:
- a calibrated point prediction
- a Venn-Abers style set of calibrated predictions
- a prediction interval induced by those calibrated predictions
Core methods:
fit(...)/calibrate(...)predict(...)/predict_point(...)predict_venn_abers(...)predict_interval(...)check_coverage(...)plot(...)
Customization points:
predictorcan be a callable or any object with.predict(...)calibratorcan be swapped for a user-supplied calibratorconformity_scorecan replace the built-in regression residual score logic
VennAbersQuantileConformalPredictor¶
Use this class when you have:
- a predictor for the
(1 - alpha)quantile of a conformity score - optionally a center predictor
mu(x)for the default score|y - mu(x)|
Core methods:
fit(...)/calibrate(...)predict_score_quantile(...)predict_score_venn_abers(...)predict_interval(...)check_coverage(...)check_threshold_calibration(...)
Customization points:
score_quantile_predictorcan be a callable or any object with.predict(...)score_fn(x, y)can replace the default absolute-residual conformity scorecalibratorcan be replaced as long as it returns a transform over predicted score quantilesinterval_solver_paramscontrols the numericygrid used for custom score level sets
Configuration types¶
RegressionAlgoConfigQuantileAlgoConfigIntervalSolverConfigHistogramConfig
Dict-based configs still work for backward compatibility, but they emit deprecation warnings so users can migrate gradually to typed configs.