Solving the Penalized Linear Regression Problem

Understanding Least Angle Regression and Its Relationship to Forward Stepwise Regression

How LARS Generates Hundreds of Models of Varying Complexity

Choosing the Best Model from The Hundreds LARS Generates

Mechanizing Cross-Validation for Model Selection in Python Code
Accumulating Errors on Each Cross-Validation Fold and Evaluating Results
Practical Considerations with Model Selection and Training Sequence

*

  • CODE 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

Comparison of the Mechanics of Glmnet and LARS Algorithms

Initializing and Iterating the Glmnet Algorithm

CODE

  • Listing 4-3: Glmnet Algorithm—glmnetWine.py
    • Figure 4-6: Coefficient curves for glmnet models for predicting wine taste