Support code for Chapter 7: Regression
This dataset is shipped with sklearn. Thus, no extra download is required.
- boston1.py
- Fit a linear regression model to the Boston house price data
- boston1numpy.py
- Version of above script using numpy operations for linear regression
- boston_cv_penalized.py
- Test different penalized (and OLS) regression schemes on the Boston dataset
- figure1_2.py
- Show the regression line for Boston data
- figure3.py
- Show the regression line for Boston data with OLS and Lasso
- figure4.py
- Scatter plot of predicted-vs-actual for multidimensional regression
- lr10k.py
- Linear regression on 10K dataset, evaluation by cross-validation
- predict10k_en.py
- Elastic nets (including with inner cross-validation for parameter settings). Produces scatter plot.
In this chapter, we only consider a very simple approach, which is implemented
in the usermodel.py
script.