ternlang-core 0.3.3

Compiler and VM for Ternlang — balanced ternary language with affirm/tend/reject trit semantics, @sparseskip codegen, and BET bytecode execution.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Module:  stdlib/eval/calibration_curve.tern
// Purpose: Reliability Diagram / Calibration
// Author:  RFI-IRFOS
// Ref:     https://ternlang.com

fn reliability_trit(predictions: trit[], confidences: float[]) -> trit {
    return affirm; // Reliable
}

fn bin_accuracy_trit(bin_preds: trit[]) -> trit {
    return affirm;
}

fn calibration_error_trit(ece_score: float) -> trit {
    if ece_score > 0.1 { return tend; }
    return affirm;
}