Bowles_4.3_wine: Solving the Penalized Linear Regression Problem

Understanding Least Angle Regression and Its Relationship to Forward Stepwise Regression

Listing 4-1: LARS Algorithm for Predicting Wine Taste—larsWine2.py

  • Figure 4-3: Coefficient curves for LARS regression on wine data.

Listing 4-2: 10-Fold Cross-Validation to Determine Best Set of Coefficients—larsWineCV.py

  • Figure 4-4: Cross-validated mean square error for LARS on wine data.

Using Glmnet: Very Fast and Very General

Listing 4-3: Glmnet Algorithm—glmnetWine.py

  • Figure 4-6: Coefficient curves for glmnet models for predicting wine taste