Description Usage Arguments Value
View source: R/elastic.net.lm.R
Implementation of the MM algorithm solver for a linear regression model with an elastic net penalty term.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | elastic.net.lm(
formula,
data,
lambda,
alpha,
intercept = F,
standardize = F,
beta.init = NULL,
beta.tol = 0,
loss.tol = 1e-06,
eps = 1e-06,
seed = NULL,
verbose = 0
)
|
formula |
an object of class |
data |
an optional data frame, list or environment (or object coercible
by |
lambda |
penalty term scaling hyperparameter. |
alpha |
L1-weight hyperparameter in elastic net penalty term. |
intercept |
optional boolean indicating whether to fit an intercept. If
|
standardize |
optional boolean indicating whether to return results for
standardized data. If |
beta.init |
optional initial beta parameters to use in the MM
algorithm. Default is |
beta.tol |
optional absolute tolerance for rounding down parameter
standardized estimates. If the absolute value of a parameter estimate in the
standardized model is smaller than |
loss.tol |
optional convergence tolerance on the elastic net loss in
the MM algorithm. Default is |
eps |
optional correction term to avoid rounding by zero. Default is
|
seed |
optional seed. Default is |
verbose |
optional number indicating per how many iterations the
estimation progress is displayed. Default is |
elastic.net.lm
returns an object of class
mlkit.lm.fit
. An object of class mlkit.lm.fit
is a list
containing at least the following components:
coefficients |
a named vector of optimal coefficients. |
loss |
residual sum of squares plus elastic net loss for optimal coefficients. |
r2 |
coefficient of determination for optimal coefficients. |
adj.r2 |
adjusted coefficient of determination for optimal coefficients. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.