Polynomial Regression Python- SKLEARN 2020 [New Research🔥]
In this tutorial video, we learned the Polynomial Regression in Python using Sklearn in 2020. We used sklearn linear regression after using PolynomialFeatures from sklearn to make a polynomial regression eq. Go through the description to know definitions and learn the most:-
What is Polynomial regression? (Source: Wiki)
In statistics, polynomial regression is a form of regression analysis in which the relationship between the independent variable x and the dependent variable y is modeled as an nth degree polynomial in x. Polynomial regression fits a nonlinear relationship between the value of x and the corresponding conditional mean of y, denoted E(y |x).
Polynomial Regression in Python using Scikit learn:
Polynomial regression is a special case of linear regression (linear_model). For this, we perform linear regression after creating some polynomial features using scikit learn package.
With scikit learn (Sklearn), we can use these 2 functions: Polynomialfeatures and LinearRegression. In the video, I showed how to use them in detail (step by step).
I used Housing.csv data for making this video; this file is saved on my google Drive. In order to see how to get free access to my google drive, continue reading.
Splitting the data for training and testing purpose:
train_test_split functionality of sklearn is used to split and randomize the data. In the end, through coef_ and intercept_ , we got coefficients and the intercept.
Matplotlib: To visualize the data, we used matplotlib.pyplot library. For the range of the x-axis, we used arange. You can use linspace as well if you want. And then we got the regression curve.
Evaluation: For r2 data (evaluation), we imported r2_score from sklearn.metrics.
Make sure to subscribe so you don’t miss out on my future videos.
✅ Subscribe: https://www.youtube.com/channel/UCyMifqUrSntvvrrGMaVPkrw?sub_confirmation=1
After subscribing, get free access to my Google Drive: Follow steps on my YouTube Channel.
📺 Watch Sentiment Analysis [Python] Text Mining (NLP) Keras Tokenizer: https://youtu.be/o4zEqZ8Aim4
👔Join the LinkedIn Group for peer to peer discussion: https://lnkd.in/f6ijsF2
👍 Like my Facebook Page to be updated: https://www.facebook.com/Financial.Programming.with.Ritvik/?modal=admin_todo_tour
👉🏼Join the WhatsApp group and learn more: https://chat.whatsapp.com/DFPKbgfrO2NG2hE6z4ppmW
👉🏼 Follow me on Quora: https://www.quora.com/profile/Ritvik-Dashora
Get FREE access to my Google Drive (1:43)
What is Polynomial Regression (4:05)
train test split (8:12)
Polynomial Features (12:22)
Sklearn modeling (17:00)
Regression Curve (21:00)
R square (27:35)
I used Anaconda jupyterlab for this code. It is an amazing platform for beginners.
I hope you like my work on the Financial Programming with Ritvik YouTube Channel. Please support me by subscribing to my channel and sharing my videos with your friends. On this channel, I put videos on how to use your programming skills in finance. I also talk about some upcoming Fintech trends, automation, and artificial intelligence in finance or ai in finance, specifically, ai in financial services. I target to spread the uses of python in finance. There is a huge growth of ai in finance industry finance machine learning using python and we should be ready for that.