Learn R Programming

ProbReco (version 0.1.2)

checkinputs: Check inputs to function.

Description

This function checks that the inputs for scoreopt and total_score are correctly setup. It is called at the start of scoreopt.

Usage

checkinputs(data, prob, S, G, score = list(score = "energy", alpha = 1))

Arguments

data

Past data realisations as vectors in a list. Each list element corresponds to a period of training data.

prob

List of functions to simulate from probabilistic forecasts. Each list element corresponds to a period of training data. The output of each function should be a matrix.

S

Matrix encoding linear constraints.

G

Values of reconciliation parameters \(d\) and \(G\) where \(\tilde{y}=S(d+G\hat{y})\). The first \(m\) elements correspond to translation vector \(d\), while the remaining elements correspond to the matrix \(G\) where the elements are filled in column-major order.

score

Score to be used. This must be a list with two elements: score for the scoring rule (currently only energy supported) and alpha, an additional parameter used in the score (e.g. power in energy score, default is 1).