fill_scores | R Documentation |
Comparing mean scores across teams requires appropriate
treatment of missing values: teams should not be able to improve
scores merely by refusing to provide predictions of, e.g. sites
or times which are hardest to predict. To avoid this,
merely removing missing values when averaging across scores is not
sufficient. A simple expedient is to replace missing values with
predictions made from a baseline 'null' forecast. This function
simply provides this behavior. Original forecast scores with missing values
are retained as crps_model
and logs_model
columns, while
crps
and logs
become filled with baseline scores from the null forecast.
fill_scores(df, null_model = "EFInull")
df |
a data frame of forecasts, with column "team" identifying different forecasts. |
null_model |
the "team" name identifying the baseline (null) forecast used for filling missing values. |
Note that this fills implicit NAs, e.g. site/time/variables predicted
by the null team but not predicted by the focal team, as well as explicit
NA
s in the focal team (where the focal team includes each of teams named
in the teams column of df
).
If teams have scores for site/time/variables not forecasted by the "null" team,
these rows are removed and thus cannot contribute to the mean score either.
If the "null" team contains explicit NA
s in scores,
(usually but not always due to missing observations), these are not removed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.