13

Machine Learning with Regression

In situations where we want to predict continuous values, such as temperature, housing prices, or salary, we can use regression models. These are another type of supervised learning besides the classification that we learned about in the last chapter. In this chapter, we'll cover some of the basics around regression models, including:

  • Linear regression using sklearn and statsmodels
  • Regularization with linear regression
  • KNN and other sklearn models for regression
  • Evaluating regression model performance

Let's get started by learning how linear regression works.

Linear regression

Linear regression has been around since the 1800s but is still used today. It is an easy-to-use and -interpret method that generally ...

Get Practical Data Science with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.