View source: R/070_Hyperparameters.R
| setup_NNLS | R Documentation |
Setup hyperparameters for non-negative least squares.
setup_NNLS(normalize = TRUE, ifw = FALSE)
normalize |
(Tunable) Logical: If TRUE, scale the coefficients to sum to 1. |
ifw |
(Tunable) Logical: If TRUE, use Inverse Frequency Weighting in classification. |
NNLS fits y ~ Xb subject to b >= 0, with no intercept. It exists as the
default meta learner of the stacked meta learners (setup_SuperLearner,
setup_ModalityStacking), where the predictors are the base learners'
cross-validated predictions and a non-negative, sum-to-one coefficient vector
is the ensemble weighting. It is a poor general-purpose learner: with no
intercept and a sign constraint it can only fit outcomes that the predictors
already span.
With normalize = TRUE the coefficients are scaled to sum to 1, so the fit is
a convex combination of the predictors. For classification the outcome is
coded 0/1 on the second factor level and the fitted values are read as
probabilities of that level; unnormalized coefficients do not guarantee a
value in [0, 1], so predictions are clamped.
Get more information from nnls::nnls.
NNLSHyperparameters object.
EDG
nnls_hyperparams <- setup_NNLS(normalize = FALSE)
nnls_hyperparams
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.