Spaces:
Sleeping
Sleeping
File size: 332 Bytes
3c17485 |
1 2 3 4 5 6 7 8 |
def normalize(value: float, min_v: float, max_v: float) -> float:
return (value - min_v) / (max_v - min_v) if max_v > min_v else 0.0
def compute_risk_score(confidence: float, physical_support: float) -> float:
"""
Higher of both yields safer profile.
"""
return round(min(1.0, confidence * physical_support), 4) |