grid_search_rel_wis_weights: Conduct a grid search by evaluating the objective function at...

View source: R/qra_fit.R

grid_search_rel_wis_weightsR Documentation

Conduct a grid search by evaluating the objective function at all parameter values in the supplied parameter grid and selecting the parameter value with lowest function value. Works only with one-dimensional parameters.

Description

Conduct a grid search by evaluating the objective function at all parameter values in the supplied parameter grid and selecting the parameter value with lowest function value. Works only with one-dimensional parameters.

Usage

grid_search_rel_wis_weights(
  par_grid,
  fn,
  model_constructor,
  qfm_train,
  y_train,
  max_weight
)

Arguments

par_grid

numeric vector of parameter values to evaluate

fn

objective function to minimize

model_constructor

function accepts a real-valued parameter 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

Value

single parameter value with lowest function value


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