Calibrator#
- class mlquantify.calibration.Calibrator[source]#
Base class for calibrators.
A calibrator learns a post-hoc transformation of a model’s outputs from a labelled held-out set with
fit, then applies it to new outputs withpredict. Subclasses implement both methods.Notes
The argument order follows scikit-learn:
fittakes the ground-truth labels first and the model output second –fit(y_true, y_pred).Examples
>>> from mlquantify.calibration import Calibrator >>> class IdentityCalibrator(Calibrator): ... def fit(self, y_true, y_pred): ... return self ... def predict(self, y_pred): ... return y_pred