Fit a generalized linear model via penalized maximum likelihood.
GLMNetModel(
family = NULL,
alpha = 1,
lambda = 0,
standardize = TRUE,
intercept = NULL,
penalty.factor = .(rep(1, nvars)),
standardize.response = FALSE,
thresh = 1e-07,
maxit = 1e+05,
type.gaussian = .(ifelse(nvars < 500, "covariance", "naive")),
type.logistic = c("Newton", "modified.Newton"),
type.multinomial = c("ungrouped", "grouped")
)
optional response type. Set automatically according to the class type of the response variable.
elasticnet mixing parameter.
regularization parameter. The default value lambda = 0
performs no regularization and should be increased to avoid model fitting
issues if the number of predictor variables is greater than the number of
observations.
logical flag for predictor variable standardization, prior to model fitting.
logical indicating whether to fit intercepts.
vector of penalty factors to be applied to each coefficient.
logical indicating whether to standardize
"mgaussian"
response variables.
convergence threshold for coordinate descent.
maximum number of passes over the data for all lambda values.
algorithm type for guassian models.
algorithm type for logistic models.
algorithm type for multinomial models.
MLModel
class object.
factor
, matrix
, numeric
,
Surv
lambda
, alpha
Default values for the NULL
arguments and further model details can be
found in the source link below.
# NOT RUN {
fit(sale_amount ~ ., data = ICHomes, model = GLMNetModel(lambda = 0.01))
# }
Run the code above in your browser using DataLab