Session Ready
Exercise

Creating a LassoCV regressor

You'll be predicting biceps circumference on a subsample of the male ANSUR dataset using the LassoCV() regressor that automatically tunes the regularization strength (alpha value) using Cross-Validation.

The standardized training and test data has been pre-loaded for you as X_train, X_test, y_train, and y_test.

Instructions
100 XP
  • Create and fit the LassoCV model on the training set.
  • Calculate \(R^2\) on the test set.
  • Create a mask for coefficients not equal to zero.