make_NA {scoringutils} | R Documentation |
Make Rows NA in Data for Plotting
Description
Filters the data and turns values into NA
before the data gets passed to
plot_predictions()
. The reason to do this is to this is that it allows to
'filter' prediction and truth data separately. Any value that is NA will then
be removed in the subsequent call to plot_predictions()
.
Usage
make_NA(data = NULL, what = c("truth", "forecast", "both"), ...)
make_na(data = NULL, what = c("truth", "forecast", "both"), ...)
Arguments
data |
A data.frame or data.table with the predictions and observations.
For scoring using
For scoring integer and continuous forecasts a
For scoring predictions in a quantile-format forecast you should provide
a column called
In addition a You can check the format of your data using |
what |
character vector that determines which values should be turned
into |
... |
logical statements used to filter the data |
Value
A data.table
Examples
make_NA (
example_continuous,
what = "truth",
target_end_date >= "2021-07-22",
target_end_date < "2021-05-01"
)