For greater accuracy on low- through medium-dimensional data sets, implement least-squares regression with regularization using
For reduced computation time on high-dimensional data sets, fit a regularized linear regression model using
|Lasso or elastic net regularization for linear models|
|Trace plot of lasso fit|
lasso identifies and discards unnecessary predictors.
Predict the mileage (MPG) of a car based on its weight, displacement, horsepower, and acceleration using
lasso and elastic net.
Identify important predictors using
lasso and cross-validation.
lasso algorithm is a regularization technique and shrinkage estimator. The related elastic net algorithm is more suitable when predictors are highly correlated.
Ridge regression addresses the problem of multicollinearity (correlated model terms) in linear regression problems.