wis_loss_rel_wis_weights: Calculate wis_loss as a function of parameters used to...

View source: R/qra_fit.R

wis_loss_rel_wis_weightsR Documentation

Calculate wis_loss as a function of parameters used to construct a relative WIS weighted qra model. This method is specific to the relative WIS weighted mean and median methods, and allows for a maximum weight; an infinite loss is returned if the largest weight is greater than this value.

Description

Calculate wis_loss as a function of parameters used to construct a relative WIS weighted qra model. This method is specific to the relative WIS weighted mean and median methods, and allows for a maximum weight; an infinite loss is returned if the largest weight is greater than this value.

Usage

wis_loss_rel_wis_weights(
  par,
  model_constructor,
  qfm_train,
  y_train,
  max_weight = 1,
  ...
)

Arguments

par

real-valued vector of parameters

model_constructor

a function that accepts a real-valued vector of parameters and returns a model of class qra_fit

qfm_train

QuantileForecastMatrix with training set predictions from component models

y_train

numeric vector of responses for training set

max_weight

numeric value for maximum weight. Defaults to 1

...

arguments passed on to the model_constructor

Value

scalar wis loss for given parameter values


reichlab/covidEnsembles documentation built on Jan. 31, 2024, 7:21 p.m.