model_categorical_lasso
See also
Other categorical model wrappers:
model_categorical_all(),
model_categorical_elastic_net(),
model_categorical_glm(),
model_categorical_ridge(),
model_categorical_svm()
Examples
x <- iris[, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")]
y <- iris$Species
model_categorical_lasso(x, y)
#>
#> Call: glmnet(x = x, y = y, family = family, alpha = 1, lambda = cv$lambda.min)
#>
#> Df %Dev Lambda
#> 1 4 95.6 0.001239