nwm_metrics.metric_functions.calculate_metrics#
- nwm_metrics.metric_functions.calculate_metrics(y_true, y_pred, metrics=[], threshold_categorical={'type': 'quantile', 'value': 0.9}, threshold_event={'type': 'quantile', 'value': 0.9})[source]#
Compute all statistical metrics between simulation and observation.
- Return type:
Dict[str,float]- Parameters:
y_true (pd.Series) – Ground truth or observations
y_pred (pd.Series) – Modeled values or simulations
metrics (list, optional) – list of metrics to be calculated; if undefined, calculate all metrics
threshold_categorical (dict, optional) – threshold value for calculating categorical scores. Default is {“value”: 0.9, “type”: “quantile”}.
threshold_event (dict, optional) – threshold value for defining events. Default is {“value”: 0.9, “type”: “quantile”}.
- Returns:
dictionary of metric values
- Return type:
Dict[str, float]