use crate::schema::Decision;
pub struct Thresholds {
pub keep: f64,
pub drop: f64,
}
impl Default for Thresholds {
fn default() -> Self {
Self {
keep: 0.85,
drop: 0.40,
}
}
}
pub fn decide(stability_score: f64, thresholds: &Thresholds) -> Decision {
if stability_score >= thresholds.keep {
Decision::Keep
} else if stability_score <= thresholds.drop {
Decision::Drop
} else {
Decision::Review
}
}