This chapter fits a model to R’s mtcars data, reads its coefficients, chooses a penalty by cross-validation and predicts the fuel economy of a new car.
1.1.1 Installing
1.1.2 A First Regression
1.1.2.1 Plotting the fit and path
1.1.2.1.1 Predicted versus actual values
1.1.2.1.2 Residuals versus fitted values
1.1.2.1.3 The lasso coefficient path
1.1.2.2 Choosing λ by cross-validation
1.1.3 Fitting from named columns
1.1.4 Choosing a model
1.1.5 Predicting
1.1.6 What is not there yet