Assert that inputs are correct for ordinal forecasts
Source:R/metrics-ordinal.R
assert_input_ordinal.Rd
Function assesses whether the inputs correspond to the requirements for scoring ordinal forecasts.
Arguments
- observed
Input to be checked. Should be an ordered factor of length n with N levels holding the observed values. n is the number of observations and N is the number of possible outcomes the observed values can assume.
- predicted
Input to be checked. Should be nxN matrix of predicted probabilities, n (number of rows) being the number of data points and N (number of columns) the number of possible outcomes the observed values can assume. If
observed
is just a single number, then predicted can just be a vector of size N. Values represent the probability that the corresponding value inobserved
will be equal to factor level referenced inpredicted_label
.- predicted_label
Ordered factor of length N with N levels, where N is the number of possible outcomes the observed values can assume.