3. Applying calibration models: Useful features

3.1. Saving & Loading

After fitting, calibration models can be saved to JSON files with calibrationmodel.save("my_calibration.json"). This facilitates their re-use across different notebooks and analysis sessions.

To load a calibration model, you’ll need to reference the class definition of the model:

cmodel = MyCustomCalibrationModel.load("my_calibration.json")

The loading routine checks the name of the calibration model class to prevent accidentally instantiating models from the wrong parameter sets.

3.2. Numerical Inference

A fitted calibration model may be used to convert from one or many measurement observations into a prediction about the independent variable. While the predict_independent gives a point estimate, we recommend to use infer_independent.

infer_independent takes one or more measurement observations as the input and returns a NumericPosterior that describes the uncertainty about the independent variable.