Skip to main content

validate

Function validate 

pub fn validate(
    links: &[SzzLink],
    commit_dates: &HashMap<String, String, impl BuildHasher>,
    bands: &[(String, HashMap<String, String, impl BuildHasher>)],
    head_health: &[CodeHealthRow],
) -> ValidationMetrics
Expand description

Band table + AUC + precision@k against defect labels.

The label set is every file touched by at least one link (link.path, deduplicated) — “defect-implicated” in the mined window. The band table tallies each link individually against the nearest historical band sample at-or-before its defect commit’s date (see [band_for_link]); AUC and precision@k score HEAD’s structural_risk against that same label set directly — independent of band-sample resolution, since head_health always carries current data for every scored file.