LASSO, Ridge regression, Elastic Net and rpart
Install packages.
install.packages("ISLR") ## ISLR - data from Introduction to Statistical Learning with R
install.packages("glmnetUtils")
install.packages("plotmo")
install.packages("rpart.plot")
In the ISLR book they have Lab sessions that are walk-throughs of how to use R for the discussed methodologies.
In the dataset Hitters
there is data from Major League Baseball Data from the 1986 and 1987 seasons:
data(Hitters, package = "ISLR")
Use Salary
as response variable and fit models using
Identify the best model e.g. by RMSE