Description Usage Arguments Value Examples
This function fits linear models with the ridge regression regularization (using the l2 norm). This method is used to reduce overfitting.
1 | ridge_hw2c(form, d, lambda_val, contrasts = NULL)
|
form |
linear model formula |
d |
data frame |
lambda_val |
the lambda value (regularization parameter) |
contrasts |
optional list of constants for factor variables aka contrast |
the best-fit coefficients with ridge regularization
1 2 | data(iris)
ridge_hw2c(Sepal.Length ~ ., iris, lambda_val = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.