Setup hyperparameters for non-negative least squares.
Details
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.
Examples
nnls_hyperparams <- setup_NNLS(normalize = FALSE)
nnls_hyperparams
#> <NNLSHyperparameters>
#> hyperparameters:
#> normalize: <lgc> FALSE
#> ifw: <lgc> FALSE
#> tunable_hyperparameters: <chr> normalize, ifw
#> fixed_hyperparameters: <chr>
#> tuned: <int> -1
#> resampled: <int> 0
#> n_workers: <int> 1
#>
#> No search values defined for tunable hyperparameters.