assert_input_nominal {scoringutils} | R Documentation |
Assert that inputs are correct for nominal forecasts
Description
Function assesses whether the inputs correspond to the requirements for scoring nominal forecasts.
Usage
assert_input_nominal(observed, predicted, predicted_label)
Arguments
observed |
Input to be checked. Should be a 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. output) |
predicted |
Input to be checked. |
predicted_label |
Factor of length N with N levels, where N is the number of possible outcomes the observed values can assume. |
Value
Returns NULL invisibly if the assertion was successful and throws an error otherwise.