Lrnr_solnp_quiet | R Documentation |
This version is a copy of sl3::Lrnr_solnp with additional consideration for users that want explicit control over printed output of solnp
R6Class
object.
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.
Learner object with methods for training and prediction. See
Lrnr_base
for documentation on learners.
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.
sl3::Lrnr_base
-> Lrnr_solnp_quiet
sl3::Lrnr_base$assert_trained()
sl3::Lrnr_base$base_chain()
sl3::Lrnr_base$base_predict()
sl3::Lrnr_base$base_train()
sl3::Lrnr_base$chain()
sl3::Lrnr_base$custom_chain()
sl3::Lrnr_base$get_outcome_range()
sl3::Lrnr_base$get_outcome_type()
sl3::Lrnr_base$predict()
sl3::Lrnr_base$predict_fold()
sl3::Lrnr_base$print()
sl3::Lrnr_base$process_formula()
sl3::Lrnr_base$reparameterize()
sl3::Lrnr_base$retrain()
sl3::Lrnr_base$sample()
sl3::Lrnr_base$set_train()
sl3::Lrnr_base$subset_covariates()
sl3::Lrnr_base$train()
sl3::Lrnr_base$train_sublearners()
new()
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, ... )
clone()
The objects of this class are cloneable with this method.
Lrnr_solnp_quiet$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other Learners:
Lrnr_density_gaussian
,
Lrnr_multinom
,
Lrnr_polspline_quiet
,
Lrnr_solnp_density_quiet
,
Lrnr_stepwise
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.