Computes a weighted average of inputs. Used in the context of computing weighted averages of predictions.
Predictions are averaged using
weights (in order of appearance in the data) which are optimized using
nonlinear optimization from the package nloptr for a measure provided in
measure. (defaults to
Learned weights can be obtained from
This Learner implements and generalizes an approach proposed in LeDell (2015) that uses non-linear
optimization in order to learn base-learner weights that optimize a given performance metric (e.g
The approach is similar but not exactly the same as the one implemented as
AUC in the SuperLearner
R package (when
For a more detailed analysis and the general idea, the reader is referred to LeDell (2015).
Note, that weights always sum to 1 by division by
sum(weights) before weighting
The parameters are the parameters inherited from
LearnerClassif, as well as:
Measure to optimize for.
Will be converted to a
Measure in case it is
"classif.ce", i.e. misclassification error for classification
"regr.mse", i.e. mean squared error for regression.
Optimizer used to find optimal thresholds.
character, converts to
opt. Initialized to
Nloptr hyperparameters are initialized to
xtol_rel = 1e-8,
algorithm = "NLOPT_LN_COBYLA"
and equal initial weights for each learner.
For more fine-grained control, it is recommended to supply a instantiated
Set a temporary log-level for
lgr::get_logger("bbotk"). Initialized to: "warn".
LearnerClassifAvg$new(), id = "classif.avg")
LearnerRegrAvg$new(), id = "regr.avg")
LeDell, Erin (2015). Scalable Ensemble Learning and Computationally Efficient Variance Estimation. Ph.D. thesis, UC Berkeley.