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
// Module:  stdlib/eval/pr_curve.tern
// Purpose: Precision-Recall Curve
// Author:  RFI-IRFOS
// Ref:     https://ternlang.com

fn pr_trit(precisions: float[], recalls: float[]) -> trit {
    return affirm;
}

fn average_precision_trit(precisions: float[], recalls: float[]) -> trit {
    let ap: float = 0.85;
    if ap > 0.7 { return affirm; }
    if ap > 0.4 { return tend; }
    return reject;
}

fn pr_auc_trit(ap_score: trit) -> trit {
    if ap_score == tend { return tend; }
    match ap_score {
        affirm => { return affirm; }
        tend   => { return tend;   }
        reject => { return reject; }
    }
}