#' # Exercise for glmnet (LASSO, Ridge regression, Elastic Net) and rpart

#' ## Install packages
#' ISLR - data from Introduction to Statistical Learning with R
install.packages("ISLR")
install.packages("glmnetUtils")
install.packages("plotmo")
install.packages("rpart.plot")

#' ## Salary for baseball hitters
#' In the dataset `Hitters` there is data from Major League Baseball Data 
#' from the 1986 and 1987 seasons:
library(ISLR)
data(Hitters)

#' Use `Salary` as response variable and fit models using
#' * LASSO
#' * Ridge regression
#' * rpart
#' 
#' Identify the best model e.g. by RMSE
