pub fn validate_thresholds(thresholds: &[f64]) -> Result<()>
Utility function to validate threshold arrays