API Reference#

This section provides detailed documentation for every public class and function in nestkit. Use the table below to jump to a specific component, or browse the sub-pages organised by topic.

Core estimators#

NestedCVClassifier

Nested cross-validation for classification tasks.

NestedCVRegressor

Nested cross-validation for regression tasks.

Result containers#

ClassifierResults

Aggregated nested CV results for classification.

RegressorResults

Aggregated nested CV results for regression.

results.ClassifierOuterFoldResult

Result of a single outer fold evaluation (classification).

results.RegressorOuterFoldResult

Result of a single outer fold evaluation (regression).

Calibration#

calibration.PostHocCalibrator

Unified interface for post-hoc probability calibration.

calibration.CalibrationDiagnostics

Assess calibration quality before and after post-hoc calibration.

Thresholding#

thresholding.ThresholdResult

Threshold optimization results for a single outer fold.

Conformal prediction#

conformal.MondrianClassifierConformal

Class-conditional (Mondrian) conformal prediction sets.

conformal.MondrianRegressorConformal

Mondrian conformal prediction intervals conditioned on predicted value.

conformal.ClassifierConformalResult

Per-class quantile thresholds from CV+ Mondrian conformal calibration.

conformal.RegressorConformalResult

Per-bin residual quantiles from Mondrian regression conformal calibration.

Model comparison#

comparison.NestedCVComparator

Statistically rigorous comparison of nested cross-validation results.

Diagnostics#

diagnostics.HyperparameterStability

Assess hyperparameter selection consistency across outer folds.

Feature importance#

importance.FeatureImportanceAggregator

Aggregate feature importances across nested CV outer folds.

Inner CV#

inner.InnerCVReport

Diagnostics for the inner CV hyperparameter search of a single outer fold.

Callbacks#

callbacks.FoldCallback

Runtime-checkable protocol for nested CV fold callbacks.

callbacks.ProgressCallback

Display a tqdm progress bar during nested cross-validation.

callbacks.CheckpointCallback

Pickle intermediate fold results to disk after each outer fold.

callbacks.LoggingCallback

Emit structured log messages at each nested CV lifecycle event.

Sub-pages#