Complete the following exercises to practice the skills covered in this chapter. Be sure to consult the Machine learning workflow section in the appendix as a refresher for the process of building models:
- Predict star temperature with elastic net linear regression as follows:
- Using the data/stars.csv file, build a pipeline to normalize the data with the MinMaxScaler and then run elastic net linear regression using all the numeric columns to predict the temperature of the star.
- Run grid search on the pipeline to find the best values for alpha, l1_ratio, and fit_intercept for the elastic net in the search space of your choice.
- Train the model on 75% of the initial data.
- Calculate the R2 of your model.
- Find the coefficients for each ...