nwm_metrics.event_metric_functions.compute_event_metrics#

nwm_metrics.event_metric_functions.compute_event_metrics(peaks, aggregation='mean')[source]#

Compute event-based metrics given paired observed and model events.

Given the event peaks identified, compute the three event-based metrics (peak bias, peak timing error, event volume bias). Return either the mean or median of metrics calculated for all events.

Return type:

Dict[str, float]

Parameters:
  • peaks – DataFrame containing event peaks and volumes from get_event_peaks()

  • aggregation – aggregation method (mean or median) for metrics calculated for all events

Returns:

Dictionary with keys “peak_bias”, “ptime_err”, and “event_bias” containing the corresponding metric values.