Blyx Nest Blyx language
Registry / Library
library · v0.1.1

Calibration

Check agreement between predicted probabilities and observed outcomes.

Source repository · Package JSON

Use Calibration

use vendor::calibration::calibration;

Run the example

nest demo calibration@0.1.1
blyxc native-run calibration-demo/main.blyx
Example source and expected output
use vendor::calibration::calibration;

fn main() {
    let labels = [0, 0, 1, 1];
    let scores = [0.25, 0.25, 0.75, 0.75];
    println!(cal_brier(labels, scores));
    println!(cal_ece(labels, scores, 2));
}

Expected output

0.0625
0.25

Published versions

VersionPackageSource commitSHA-256
0.1.1Download ZIPf978f7f43e27ef2ad41d82db5073911c7df982cfba74faaa3ba337e33672dc3d5eecfa1fa3