testClassifier function test exported ✓ 100.0%

Last updated: 2026-02-24T21:07:57.551Z

Metrics

LOC: 17 Complexity: 1 Params: 2 Coverage: 100.0% (6/6 lines, 5x executed)

Signature

testClassifier( thresholds: AccuracyThresholds = DEFAULT_THRESHOLDS, ): : ClassifierReport

Summary

Run the final test/control set — should only be called once after all tuning.

Source Code

export function testClassifier(
  thresholds: AccuracyThresholds = DEFAULT_THRESHOLDS,
): ClassifierReport {
  const result = runTestEvaluation(classifySignals);
  const health = checkDatasetHealth();

  const failingTypes = Object.entries(result.perType)
    .filter(([, v]) => v.accuracy < thresholds.perTypeMin)
    .map(([type]) => type);

  return {
    globalAccuracy: result.globalAccuracy,
    passesGlobalThreshold: result.globalAccuracy >= thresholds.globalMin,
    failingTypes,
    health,
  };
}

Dependencies (Outgoing)

graph LR testClassifier["testClassifier"] checkDatasetHealth["checkDatasetHealth"] testClassifier -->|calls| checkDatasetHealth style testClassifier fill:#dbeafe,stroke:#2563eb,stroke-width:2px click testClassifier "172c1c69c62be40a.html" click checkDatasetHealth "3be8e84862588bff.html"
TargetType
checkDatasetHealth calls

Impact (Incoming)

graph LR testClassifier["testClassifier"] EvalMisclassified["EvalMisclassified"] EvalMisclassified -->|uses| testClassifier style testClassifier fill:#dbeafe,stroke:#2563eb,stroke-width:2px click testClassifier "172c1c69c62be40a.html" click EvalMisclassified "4e0d00ef54656ad2.html"
SourceType
EvalMisclassified uses