check_predictions: Check Prediction Input For Lower-level Scoring Functions

View source: R/input-check-helpers.R

check_predictionsR Documentation

Check Prediction Input For Lower-level Scoring Functions

Description

Helper function to check inputs for lower-level score functions.

Usage

check_predictions(
  predictions,
  true_values = NULL,
  type = c("continuous", "integer", "binary"),
  class = c("vector", "matrix")
)

Arguments

predictions

an object with predictions. Depending on whether class = vector or class = "matrix" this can be either a vector of length n (corresponding to the length of the true_values) or a nxN matrix of predictive samples, n (number of rows) being the number of data points and N (number of columns) the number of Monte Carlo samples

true_values

A vector with the true observed values of size n

type

character, one of "continuous" (default), "integer" or "binary" that defines the type of the forecast

class

character, either "vector" (default) or "matrix" that determines the class the input has to correspond to


scoringutils documentation built on Feb. 16, 2023, 7:30 p.m.