Evaluation metrics
To evaluate the peformance of both point and probabilistic forecasts, PostForecasts.jl offers methods for calculating popular evaluation metrics.
PostForecasts.mae
— Functionmae(pf::PointForecasts)
Calculate Mean Absolute Error of predictions from pf
. Return the vector of MAE corresponding to each forecaster.
PostForecasts.mape
— Functionmape(pf::PointForecasts; eps=1e-9)
Calculate Mean Absolute Percentage Error of predictions from pf
. Return the vector of MAPE corresponding to each forecaster.
PostForecasts.smape
— Functionsmape(pf::PointForecasts; eps=1e-9)
Calculate Symmetric Mean Absolute Percentage Error of predictions from pf
. Return the vector of SMAPE corresponding to each forecaster.
PostForecasts.mse
— Functionmse(pf::PointForecasts)
Calculate Mean Squared Error of predictions from pf
. Return the vector of MSE corresponding to each forecaster.
PostForecasts.pinball
— Functionpinball(qf::QuantForecasts)
Calculate Pinball Loss over all quantiles in qf
. Return the vector of Pinball Loss values corresponding to each quantile. See Gneiting 2011 for more details about Pinball Loss.
Note
Average Pinball Loss over equidistant quantiles approximates Continuous Ranked Probability Score.
PostForecasts.crps
— Functioncrps(qf::QuantForecasts)
Approximate Continuous Ranked Probability Score using the Pinball Loss of quantile forecasts in qf
, with 2mean(pinball(qf))
.
Note
Approximating CRPS with the average Pinball Loss requires a dense grid of equidistant quantiles.
PostForecasts.coverage
— Functioncoverage(qf::QuantForecasts)
Calculate empirical coverage of quantile predictions in qf
. Return the vector of coverage corresponding to each quantile.