MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / test_auc_simple_case

Function test_auc_simple_case

ciphercore-base/src/ops/auc.rs:228–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

226
227 #[test]
228 fn test_auc_simple_case() -> Result<()> {
229 let one = FixedPrecisionConfig::default().denominator() as i64;
230 let y_true = vec![0, one, 0, one];
231 let y_pred = vec![-10, 30, 20, 10];
232 let res = test_helper(y_true, y_pred)?;
233 assert!((res - 0.75).abs() < 1e-3);
234 Ok(())
235 }
236
237 #[test]
238 fn test_auc_equal_predictions() -> Result<()> {

Callers

nothing calls this directly

Calls 2

denominatorMethod · 0.80
test_helperFunction · 0.70

Tested by

no test coverage detected