This chapter is divided into the following recipes: Using linear regression Understanding the cost function Doing linear regression with lasso Doing ridge regression