Evaluation utilities¶
The evaluation scripts are kept as repository modules rather than packaged estimators. They are intended for experiments, notebooks, and benchmark runs.
noise_cv_eval.py¶
The 5-fold evaluation module provides helpers for baseline runs, filtered runs, full experiments, and grid experiments:
run_5cv_baselinerun_5cv_filtersrun_5cv_experimentrun_5cv_grid
The classification output includes fold metadata, preprocessing metadata, timing, validity flags, and common metrics such as accuracy, balanced accuracy, macro-F1, macro-precision, and macro-recall.
The removal output includes the predicted removals, true noisy rows when known, exact/partial ground-truth metadata, and confusion-matrix-derived removal metrics.
noise_score_eval.py¶
Evaluate a continuous noise score as a ranking of suspicious samples.
ROC-AUC and Average Precision evaluate the full ranking across all possible thresholds. Precision@k / Recall@k / F1@k check whether the k most suspicious instances match the k truly corrupted ones, where k is the number of actual noisy samples.
Evaluate how useful a score is as a progressive filtering criterion.
For each removal percentage, the top-scoring samples are removed, the estimator is refit, and the metric is computed.
If cv is provided, the procedure is repeated fold-by-fold using
StratifiedKFold. The filtering is always computed only on the training fold
to avoid test leakage.
When cv is None, the function fits on the full input and leaves the metric
evaluation flexible: metric_fn may be a regular sklearn metric, a scorer,
or a closure that only needs the fitted estimator.