calc_prediction_accuracy: calculate proportion of prediction points which are within...

View source: R/forecasting_practical.R

calc_prediction_accuracyR Documentation

calculate proportion of prediction points which are within threshold

Description

calc_prediction_accuracy calculates the proportion of prediction points which are within a given percentage threshold of the observed incidence

Usage

calc_prediction_accuracy(prediction_df, tolerance = 0.25)

Arguments

prediction_df

prediction data frame returned by extract_predicted_points or extract_predicted_points_seir

tolerance

numeric vector of length 1: parameter specifying range within which the predicted incidence should fall. For example, if tolerance = 0.25, a predicted point is deemed to be accurate if the predicted incidence is between 75% and 125% of the observed incidence.

Value

numeric vector of length 1: the proportion of prediction points which are within a given percentage threshold of the observed incidence


c97sr/learnidd documentation built on Jan. 12, 2025, 4:24 p.m.