GLM with elastic-net
Usage
renoir_glmnet(
x,
y,
weights = NULL,
offset = NULL,
clean,
keep.call,
alpha = 1,
relax = F,
gamma = 1,
resp.type,
observations = NULL,
features = NULL,
learning.method,
...
)
Arguments
- x
the input matrix, where rows are observations and columns are variables
- y
the response variable. Its number of rows must match the number of rows of
x
- weights
priors of the observations
- offset
used only for GLM methods, it is an a priori known component to be included in the linear predictor during fitting
- alpha
The elasticnet mixing parameter, with \(0\le\alpha\le 1\). The penalty is defined as $$(1-\alpha)/2||\beta||_2^2+\alpha||\beta||_1.$$
alpha=1
is the lasso penalty, andalpha=0
the ridge penalty.- relax
If
TRUE
then for each active set in the path of solutions, the model is refit without any regularization. Seedetails
for more information. This argument is new, and users may experience convergence issues with small datasets, especially with non-gaussian families. Limiting the value of 'maxp' can alleviate these issues in some cases.- gamma
dummy variable, not used in training but set in config
- resp.type
the response type
- observations
indices of observations to keep
- features
indices of predictors to keep
- ...
further arguments to
glmnet
Value
An object of class Trained