From the course: Python: Working with Predictive Analytics
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Polynomial regression - Python Tutorial
From the course: Python: Working with Predictive Analytics
Polynomial regression
- [Instructor] We are in the modeling section of the roadmap, starting to polynomial regression. In most cases, data does not contain a linear relationship, and we may need a more complex relationship to work with. We will look into polynomial regression in this session. You can use a linear model to fit nonlinear data. One way to do it is to add powers to each variable as if they were new variables, in other words, new features. Then, we will train a model on these variables. This model will be linear and is called polynomial regression. Suppose you want to calculate the bonus of the employees based on how many years of experience they have on the job. Please open the begin Excel file. Here in this example we can see the years of experience and the bonus values. If we fit a quadratic equation here, which is shown in red, with degree equals to two, the most senior employees will receive a smaller bonus. That does not seem fair. Instead we will fit a more complex, a cubical equation…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Introduction to predictive models2m 52s
-
Linear regression6m 25s
-
Polynomial regression4m 37s
-
Support Vector Regression (SVR)4m 8s
-
Decision tree regression5m 43s
-
Random forest regression4m 44s
-
Evaluation of predictive models2m 56s
-
Hyperparameter optimization5m 4s
-
Challenge: Hyperparameter optimization1m 15s
-
Solution: Hyperparameter optimization6m 55s
-
-