Lrnr_solnp_quiet: sl3 extension: Nonlinear Optimization via Augmented Lagrange

Lrnr_solnp_quietR Documentation

sl3 extension: Nonlinear Optimization via Augmented Lagrange

Description

This version is a copy of sl3::Lrnr_solnp with additional consideration for users that want explicit control over printed output of solnp

Format

R6Class object.

Details

This meta-learner provides fitting procedures for any pairing of loss function and metalearner function, subject to constraints. The optimization problem is solved by making use of solnp, using Lagrange multipliers. For further details, consult the documentation of the Rsolnp package.

Value

Learner object with methods for training and prediction. See Lrnr_base for documentation on learners.

Parameters

learner_function=metalearner_linear

A function(alpha, X) that takes a vector of covariates and a matrix of data and combines them into a vector of predictions. See metalearners for options.

loss_function=loss_squared_error

A function(pred, truth) that takes prediction and truth vectors and returns a loss vector. See loss_functions for options.

make_sparse=TRUE

If TRUE, zeros out small alpha values.

convex_combination=TRUE

If TRUE, constrain alpha to sum to 1.

init_0=FALSE

If TRUE, alpha is initialized to all 0's, useful for TMLE. Otherwise, it is initialized to equal weights summing to 1, useful for SuperLearner.

trace=0

The value of the objective function and the parameters is printed at every major iteration (default 0).

tol=0

Relative tolerance on feasibility and optimality (default 1e-5, default in Rsolnp package is 1e-8).

...

Not currently used.

Super class

sl3::Lrnr_base -> Lrnr_solnp_quiet

Methods

Public methods

Inherited methods

Method new()

Usage
Lrnr_solnp_quiet$new(
  learner_function = metalearner_linear,
  loss_function = loss_squared_error,
  make_sparse = TRUE,
  convex_combination = TRUE,
  init_0 = FALSE,
  tol = 1e-05,
  trace = 0,
  ...
)

Method clone()

The objects of this class are cloneable with this method.

Usage
Lrnr_solnp_quiet$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other Learners: Lrnr_density_gaussian, Lrnr_multinom, Lrnr_polspline_quiet, Lrnr_solnp_density_quiet, Lrnr_stepwise


alexpkeil1/vibr documentation built on Sept. 13, 2023, 3:20 a.m.