- x
n by p matrix of numeric predictors.
- y
vector of response values of length n.
For binary classification, y should be a factor with 2 levels.
- alpha
elastic net penalty mixing parameter with \(0 \le \alpha \le 1\).
alpha = 1 is the LASSO penalty, and alpha = 0 the Ridge penalty.
- nlambda
number of penalization levels.
- lambda
optional user-supplied sequence of penalization levels.
If given and not NULL, nlambda and lambda_min_ratio are ignored.
- lambda_min_ratio
Smallest value of the penalization level as a fraction of the
largest level (i.e., the smallest value for which all coefficients are zero).
The default depends on the sample size relative to the number of variables and alpha.
If more observations than variables are available, the default is 1e-3 * alpha,
otherwise 1e-2 * alpha.
- scale
fixed scale of the residuals.
- starting_points
a list of staring points, created by starting_point().
The starting points are shared among all penalization levels.
- penalty_loadings
a vector of positive penalty loadings (a.k.a. weights)
for different penalization of each coefficient. Only allowed for alpha > 0.
- intercept
include an intercept in the model.
- eff
the desired asymptotic efficiency of the M-estimator under the Normal model.
- rho
which \(\rho\) function to use (see rho_function() for the list of supported
options).
- cc
manually specified cutoff constant for the chosen \(\rho\) function.
If specified, overrides the eff argument.
- eps
numerical tolerance.
- explore_solutions
number of solutions to compute up to the desired precision eps.
- explore_tol
numerical tolerance for exploring possible solutions.
Should be (much) looser than eps to be useful.
- max_solutions
only retain up to max_solutions unique solutions per penalization level.
- comparison_tol
numeric tolerance to determine if two solutions are equal.
The comparison is first done on the absolute difference in the value of the objective
function at the solution.
If this is less than comparison_tol, two solutions are deemed equal if the
squared difference of the intercepts is less than comparison_tol and the squared
\(L_2\) norm of the difference vector is less than comparison_tol.
- sparse
use sparse coefficient vectors.
- ncores
number of CPU cores to use in parallel. By default, only one CPU core is used.
Not supported on all platforms, in which case a warning is given.
- standardize
logical flag to standardize the x variables prior to fitting the
M-estimates. Coefficients are always returned on the original scale.
This can fail for variables with a large proportion of a single value
(e.g., zero-inflated data). In this case, either compute with
standardize = FALSE or standardize the data manually.
- algorithm_opts
options for the MM algorithm to compute estimates.
See mm_algorithm_options() for details.
- add_zero_based
also consider the 0-based regularization path in addition to the given
starting points.
- mscale_bdp, mscale_opts
options for the M-scale estimate used to standardize
the predictors (if standardize = TRUE).