Description Usage Arguments Author(s) Examples
The glmnet package that Elastic Net can use is nice, but you can not use the formula and you need to type it in matrix. So we created an elasticnet package that Elastic Net can use in formula. This is a wrapper for the glmnet package, which requires the glmnet package to work. Also, the elasticnet package can automatically tune the best alpha and lambda.
1 2 3 |
formula |
an object of class "formula" : a symbolic description of the model to be fitted. |
data |
an optional data frame containing the variables in the model. |
family |
Response type. Default is NULL. If NULL, family is automatically selected. |
lambda |
"lambda.1se" or "lambda.min". |
alpha |
The elasticnet mixing parameter, 0 or more and 1 or less. alpha=1 is the lasso penalty, and alpha=0 the ridge penalty. |
alpha_step |
Step in searching for parameter alpha. |
seed |
Random number generation. |
Toshihiro Iguchi
1 2 3 | result <- elasticnet(Sepal.Length ~., iris)
plot(result)
summary(result)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.