CHAPTER 6Supervised Learning—Linear Regression
Types of Linear Regression
In the previous chapter, you learned how to get started with machine learning using simple linear regression, first using Python, and then followed by using the Scikit‐learn library. In this chapter, we will look into linear regression in more detail and discuss another variant of linear regression known as polynomial regression.
To recap, Figure 6.1 shows the Iris dataset used in Chapter 5, “Getting Started with Scikit‐learn for Machine Learning.” The first four columns are known as the features, or also commonly referred to as the independent variables. The last column is known as the label, or commonly called the dependent variable (or dependent variables if there is more than one label).
Figure 6.1: Some terminologies for features and label
In simple linear regression, we talked about the linear relationship between one independent variable and one dependent variable. In this chapter, besides simple linear regression, we will also discuss the following:
- Multiple Regression Linear relationships between two or more independent variables and one dependent variable.
- Polynomial Regression Modeling the relationship between one independent variable and one dependent variable using an nth degree ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access