|
| https://realpython.com/ |
| Start Here | https://realpython.com/start-here/ |
|
Learn Python
| https://realpython.com/courses/python-linear-regression/continue/ |
| Python Tutorials →In-depth articles and video courses | https://realpython.com/search?kind=article&kind=course&order=newest |
| Learning Paths →Guided study plans for accelerated learning | https://realpython.com/learning-paths/ |
| Quizzes & Exercises →Check your learning progress | https://realpython.com/quizzes/ |
| Browse Topics →Focus on a specific area or skill level | https://realpython.com/tutorials/all/ |
| Community Chat →Learn with other Pythonistas | https://realpython.com/community/ |
| Office Hours →Live Q&A calls with Python experts | https://realpython.com/office-hours/ |
| Podcast →Hear what’s new in the world of Python | https://realpython.com/podcasts/rpp/ |
| Books →Round out your knowledge and learn offline | https://realpython.com/products/books/ |
| Reference →Concise definitions for common Python terms | https://realpython.com/ref/ |
| Code Mentor →BetaPersonalized code assistance & learning tools | https://realpython.com/mentor/ |
| Unlock All Content → | https://realpython.com/account/join/ |
|
More
| https://realpython.com/courses/python-linear-regression/continue/ |
| Learner Stories | https://realpython.com/learner-stories/ |
| Python Newsletter | https://realpython.com/newsletter/ |
| Python Job Board | https://www.pythonjobshq.com |
| Meet the Team | https://realpython.com/team/ |
| Become a Tutorial Writer | https://realpython.com/write-for-us/ |
| Become a Video Instructor | https://realpython.com/become-an-instructor/ |
| Search | https://realpython.com/search |
| https://realpython.com/search |
| Join | https://realpython.com/account/join/ |
| Sign‑In | https://realpython.com/account/login/?next=%2Fvideos%2Fpython-linear-regression-overview%2F |
| https://realpython.com/courses/python-linear-regression/#team |
| Starting With Linear Regression in Python | https://realpython.com/courses/python-linear-regression/ |
| Cesar Aguilar | https://realpython.com/courses/python-linear-regression/#team |
| Recommended Tutorial | https://realpython.com/linear-regression-in-python/ |
| Course Slides (.pdf) | https://realpython.com/courses/python-linear-regression/downloads/python-linear-regression-slides/ |
| Sample Code (.zip) | https://realpython.com/courses/python-linear-regression/downloads/python-linear-regression-sample-code/ |
| Ask a Question | https://realpython.com/courses/python-linear-regression/continue/#discussion |
| https://realpython.com/feedback/survey/course/python-linear-regression/liked/?from=lesson-title |
| https://realpython.com/feedback/survey/course/python-linear-regression/disliked/?from=lesson-title |
| Contents | https://realpython.com/courses/python-linear-regression/continue/#description |
| Transcript | https://realpython.com/courses/python-linear-regression/continue/#transcript |
| Discussion (1) | https://realpython.com/courses/python-linear-regression/continue/#discussion |
| data | https://realpython.com/tutorials/data-science/ |
| artificial intelligence | https://realpython.com/python-ai-neural-network/ |
| Data science | https://realpython.com/data-science-podcasts/ |
| statistics | https://realpython.com/python-statistics/ |
| machine learning | https://realpython.com/tutorials/machine-learning/ |
| Using Jupyter Notebooks | https://realpython.com/courses/using-jupyter-notebooks/ |
| Sample Code (.zip) | https://realpython.com/courses/python-linear-regression/downloads/python-linear-regression-sample-code/ |
| Course Slides (.pdf) | https://realpython.com/courses/python-linear-regression/downloads/python-linear-regression-slides/ |
| 00:00 | https://realpython.com/courses/python-linear-regression/continue/#t=0.48 |
| Hey there. | https://realpython.com/courses/python-linear-regression/continue/#t=0.48 |
| Welcome to this Real Python course on implementing linear regression in Python. | https://realpython.com/courses/python-linear-regression/continue/#t=1.11 |
| 00:07 | https://realpython.com/courses/python-linear-regression/continue/#t=7.63 |
| What is regression? | https://realpython.com/courses/python-linear-regression/continue/#t=7.63 |
| Regression analysis is a statistical method for estimating the relationship | https://realpython.com/courses/python-linear-regression/continue/#t=9.43 |
| between a dependent variable and one or more independent variables. | https://realpython.com/courses/python-linear-regression/continue/#t=13.69 |
| 00:19 | https://realpython.com/courses/python-linear-regression/continue/#t=19.27 |
| Regression techniques are used in all branches of the sciences and finance. | https://realpython.com/courses/python-linear-regression/continue/#t=19.27 |
| The two main uses of regression are prediction and inference. In | https://realpython.com/courses/python-linear-regression/continue/#t=24.49 |
| prediction, | https://realpython.com/courses/python-linear-regression/continue/#t=29.38 |
| the goal is to forecast the outcome of some event, state, or object from some | https://realpython.com/courses/python-linear-regression/continue/#t=30.22 |
| previous knowledge. Whereas in inference, | https://realpython.com/courses/python-linear-regression/continue/#t=34.87 |
| your goal is to determine whether an event, | https://realpython.com/courses/python-linear-regression/continue/#t=37.96 |
| a state, or an object affects the production of another event, state, or object. | https://realpython.com/courses/python-linear-regression/continue/#t=40.0 |
| 00:45 | https://realpython.com/courses/python-linear-regression/continue/#t=45.7 |
| When used for prediction, | https://realpython.com/courses/python-linear-regression/continue/#t=45.7 |
| regression analysis has substantial overlap with the field of machine learning. | https://realpython.com/courses/python-linear-regression/continue/#t=47.11 |
| 00:54 | https://realpython.com/courses/python-linear-regression/continue/#t=54.25 |
| In regression, | https://realpython.com/courses/python-linear-regression/continue/#t=54.25 |
| the goal is to build a mathematical model describing the effect of a set of | https://realpython.com/courses/python-linear-regression/continue/#t=55.27 |
| input variables on another variable y. | https://realpython.com/courses/python-linear-regression/continue/#t=59.53 |
| The input variables are sometimes called predictors, | https://realpython.com/courses/python-linear-regression/continue/#t=61.87 |
| independent variables, or features. The variable y is called the | https://realpython.com/courses/python-linear-regression/continue/#t=67.03 |
| response, the output, or the dependent variable. As an example, | https://realpython.com/courses/python-linear-regression/continue/#t=72.01 |
| y might be the sale price of a home, | https://realpython.com/courses/python-linear-regression/continue/#t=77.14 |
| and the independent variables might be the square footage of the home, | https://realpython.com/courses/python-linear-regression/continue/#t=80.08 |
| the proximity of the home to schools, the proximity of the home to hospitals, | https://realpython.com/courses/python-linear-regression/continue/#t=84.28 |
| or maybe the sell price of other homes in the same neighborhood. | https://realpython.com/courses/python-linear-regression/continue/#t=89.08 |
| 01:33 | https://realpython.com/courses/python-linear-regression/continue/#t=93.34 |
| In regression, | https://realpython.com/courses/python-linear-regression/continue/#t=93.34 |
| you assume some mathematical model between y and x. Here, | https://realpython.com/courses/python-linear-regression/continue/#t=94.27 |
| f is the model. It’s a function of x, | https://realpython.com/courses/python-linear-regression/continue/#t=99.16 |
| and the response depends on the model plus some random error term (ε). | https://realpython.com/courses/python-linear-regression/continue/#t=102.4 |
| 01:48 | https://realpython.com/courses/python-linear-regression/continue/#t=108.25 |
| So the main goal of regression is to build a good model for f. | https://realpython.com/courses/python-linear-regression/continue/#t=108.25 |
| 01:54 | https://realpython.com/courses/python-linear-regression/continue/#t=114.16 |
| To build the model, you need data. In other words, | https://realpython.com/courses/python-linear-regression/continue/#t=114.16 |
| you need observations or actual measurements. | https://realpython.com/courses/python-linear-regression/continue/#t=117.25 |
| So in the example of the sell price of a home, | https://realpython.com/courses/python-linear-regression/continue/#t=120.49 |
| you’ve got the data for the sell price of one home, another home, | https://realpython.com/courses/python-linear-regression/continue/#t=123.22 |
| a third home, and so on. | https://realpython.com/courses/python-linear-regression/continue/#t=128.08 |
| 02:11 | https://realpython.com/courses/python-linear-regression/continue/#t=131.41 |
| The gist of a regression technique— | https://realpython.com/courses/python-linear-regression/continue/#t=131.41 |
| so what differentiates it among others—is how you take the n observations | https://realpython.com/courses/python-linear-regression/continue/#t=133.21 |
| to build the model f. There are many regression techniques: | https://realpython.com/courses/python-linear-regression/continue/#t=138.16 |
| linear, polynomial regression, nonlinear regression, decision trees, | https://realpython.com/courses/python-linear-regression/continue/#t=142.72 |
| support vector machines, neural networks, and many others. | https://realpython.com/courses/python-linear-regression/continue/#t=147.4 |
| 02:32 | https://realpython.com/courses/python-linear-regression/continue/#t=152.5 |
| In this course, | https://realpython.com/courses/python-linear-regression/continue/#t=152.5 |
| you’re going to learn how to use the Python module scikit-learn to implement | https://realpython.com/courses/python-linear-regression/continue/#t=153.43 |
| linear regression and the related polynomial regression. | https://realpython.com/courses/python-linear-regression/continue/#t=157.57 |
| Why linear regression? Well, | https://realpython.com/courses/python-linear-regression/continue/#t=162.07 |
| linear regression is the most widely used regression method. In linear | https://realpython.com/courses/python-linear-regression/continue/#t=164.83 |
| regression, the model f is assumed to take the following form. | https://realpython.com/courses/python-linear-regression/continue/#t=169.21 |
| 02:54 | https://realpython.com/courses/python-linear-regression/continue/#t=174.19 |
| The input variables appear linearly in the model, | https://realpython.com/courses/python-linear-regression/continue/#t=174.19 |
| and you have a constant term (𝑏₀), | https://realpython.com/courses/python-linear-regression/continue/#t=177.73 |
| which is sometimes called the bias or the intercept. | https://realpython.com/courses/python-linear-regression/continue/#t=179.32 |
| scikit-learn is used in machine learning and built on top of the popular module | https://realpython.com/courses/python-linear-regression/continue/#t=183.52 |
| NumPy. | https://realpython.com/courses/python-linear-regression/continue/#t=188.11 |
| 03:11 | https://realpython.com/courses/python-linear-regression/continue/#t=191.05 |
| Let’s talk a little bit about the environment that I’ll be using for the course. | https://realpython.com/courses/python-linear-regression/continue/#t=191.05 |
| You’re going to need scikit-learn. You can use pip to install it, | https://realpython.com/courses/python-linear-regression/continue/#t=195.13 |
| or if you want other modules for data science, I recommend Anaconda Python. | https://realpython.com/courses/python-linear-regression/continue/#t=199.48 |
| 03:25 | https://realpython.com/courses/python-linear-regression/continue/#t=205.09 |
| I’m going to be using Jupyter in this course. | https://realpython.com/courses/python-linear-regression/continue/#t=205.09 |
| So if you’re not familiar with Jupyter, | https://realpython.com/courses/python-linear-regression/continue/#t=207.61 |
| you can go ahead and check out this Real Python course on how to use Jupyter. | https://realpython.com/courses/python-linear-regression/continue/#t=209.35 |
| 03:34 | https://realpython.com/courses/python-linear-regression/continue/#t=214.33 |
| But if you’re more comfortable with using your own editor, it’s perfectly fine. | https://realpython.com/courses/python-linear-regression/continue/#t=214.33 |
| You’ll have no problems following along. And one more note, | https://realpython.com/courses/python-linear-regression/continue/#t=218.65 |
| the code in this course has been tested in Python 3.9, | https://realpython.com/courses/python-linear-regression/continue/#t=222.97 |
| but even if you have slightly older versions of Python, you should be all right. | https://realpython.com/courses/python-linear-regression/continue/#t=226.33 |
| 03:51 | https://realpython.com/courses/python-linear-regression/continue/#t=231.99 |
| Here’s the table of contents of the course. | https://realpython.com/courses/python-linear-regression/continue/#t=231.99 |
| We’re going to begin by taking a look at simple linear regression. | https://realpython.com/courses/python-linear-regression/continue/#t=234.27 |
| This is linear regression where we only have one input variable. | https://realpython.com/courses/python-linear-regression/continue/#t=238.23 |
| 04:02 | https://realpython.com/courses/python-linear-regression/continue/#t=242.07 |
| Then we’ll move on to multiple linear regression and then tackle polynomial | https://realpython.com/courses/python-linear-regression/continue/#t=242.07 |
| regression, both for the simple case and for the multiple input case. | https://realpython.com/courses/python-linear-regression/continue/#t=246.96 |
| And then we’ll wrap things up in a summary. All right. | https://realpython.com/courses/python-linear-regression/continue/#t=251.49 |
| 04:14 | https://realpython.com/courses/python-linear-regression/continue/#t=254.85 |
| I hope you’re looking forward to the course. Let’s get going then. | https://realpython.com/courses/python-linear-regression/continue/#t=254.85 |
| Dec. 12, 2023 | https://realpython.com/courses/python-linear-regression/continue/#comment-72e9fa3a-2cf2-43e3-86f5-589010136a5d |
| Become a Member | https://realpython.com/account/join/ |
| Overview | https://realpython.com/courses/python-linear-regression/ |
| https://realpython.com/videos/simple-linear-regression-background/ |
|
Starting With Linear Regression in Python (Overview) 04:19
| https://realpython.com/videos/python-linear-regression-overview/ |
|
Simple Linear Regression: Background 05:46
| https://realpython.com/videos/simple-linear-regression-background/ |
|
Simple Linear Regression: Code 06:57
| https://realpython.com/lessons/simple-linear-regression-code/ |
|
Multiple Linear Regression: Background 05:01
| https://realpython.com/lessons/multiple-linear-regression-background/ |
|
Multiple Linear Regression: Code 04:59
| https://realpython.com/lessons/multiple-linear-regression-code/ |
|
Polynomial Regression: Background 07:47
| https://realpython.com/lessons/polynomial-regression-background/ |
|
Simple Polynomial Regression: Code 06:35
| https://realpython.com/lessons/simple-polynomial-regression-code/ |
|
Multiple Polynomial Regression: Code 04:36
| https://realpython.com/lessons/multiple-polynomial-regression-code/ |
|
Linear Regression in Python (Quiz) 06:30
| https://realpython.com/lessons/linear-regression-in-python-quiz/ |
|
Starting With Linear Regression in Python (Summary) 00:53
| https://realpython.com/lessons/python-linear-regression-summary/ |
| Privacy Policy | https://realpython.com/privacy-policy/ |
Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover