Skip to contents

model_categorical_ridge

Usage

model_categorical_ridge(x, y)

Arguments

x

features/predictors used in prediction of outcome

y

categorical outcome to predict

Value

Fitted ridge regression model from glmnet.

Examples

x <- iris[, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")]
y <- iris$Species
model_categorical_ridge(x, y)
#> 
#> Call:  glmnet(x = x, y = y, family = family, alpha = 0, lambda = cv$lambda.min) 
#> 
#>   Df  %Dev Lambda
#> 1  4 74.45 0.0435