No video

Linear Regression with Python in 60 Seconds

  Рет қаралды 117,968

Rob Mulla

Rob Mulla

Күн бұрын

Learn about Linear Regression in python in this short!
#python #datascience #shorts

Пікірлер: 82
@jaehuilim7467
@jaehuilim7467 4 ай бұрын
An excellent illustration of Overfitting
@zabeardybeardy232
@zabeardybeardy232 Ай бұрын
and of a regresion with one variable... Notice how the plot literally tells you that views correlate with the fact that tomorrow is another day.
@Leisure4682
@Leisure4682 Ай бұрын
Isn't it underfitting? The model is too simplistic for the data points. A second degree equation will work a lot better.
@starship9629
@starship9629 Ай бұрын
Your comment proves you have no idea about machine learning. Estimates for linear regression are by definition unbiased on linear data. However in non-linear data like this, linear regression has high bias because it can only capture linear decision boundaries. Ao the model is in-fact underfittting. Also this comment and the uploader of this video assumes these model are good at extrapolating which is not their intended use at all. In this example, the uploader is trying to model a time-series with a simple linear regression which will only work if the decision boundary is linear which it is not.
@starship9629
@starship9629 Ай бұрын
​@@zabeardybeardy232Yes. Linear models can not fit on non-linear data hence they have low complexity. Low complexity = underfitting
@jaehuilim7467
@jaehuilim7467 Ай бұрын
@@starship9629 lol...I guess you are missing the point of this video. Because the provider made this video to demonstrate "Linear regression", we all know that we are only focusing on the general trend in this data. Then, the fitted least squares (I assume!) regression line should pierce through the data points on the plot. To me, a line with a slightly lower slope seems to be more appropriate regression line.
@asdeEducation
@asdeEducation 2 жыл бұрын
I hope I remember come back to this video in October
@robmulla
@robmulla 2 жыл бұрын
Haha. Set a reminder! Hopefully we can beat the forecast!
@kartikgoswami
@kartikgoswami Жыл бұрын
Its November
@nirjalkumarmahato330
@nirjalkumarmahato330 Жыл бұрын
It's January
@nirjalkumarmahato330
@nirjalkumarmahato330 Жыл бұрын
It's February 🙃
@alirezouali3119
@alirezouali3119 Жыл бұрын
It’s march
@ferrychandra9934
@ferrychandra9934 9 ай бұрын
Now do this without libraries, except Matplotlib and Pandas 😂
@David-hl9iv
@David-hl9iv 8 ай бұрын
With Linear regression you don't necessarily need to get a line. By choosing different functions as your basis elements for the regression, you can fit any curve to the data, be it exponential or a sine curve. Linear Regression looks to minimize the distance of expected outputs at x to outputs that can be represented by the linear combinations of the functions that you are given, at that point.
@paulantoni1934
@paulantoni1934 4 ай бұрын
Yeah but then we could just go for polynomial regression.
@spazeasterix6723
@spazeasterix6723 3 ай бұрын
Although correct in concept, exponentials are rarely practically used. Probably because exponentials are much more sensitive than even polynomial functions and are therefore much more susceptible to overfitting. But as I said, technically, you're implication is correct.
@1_lloyd_146
@1_lloyd_146 2 жыл бұрын
Btw, I rlly love this type of video, so make more videos of linear and nonlinear regression plsssss
@robmulla
@robmulla 2 жыл бұрын
Thanks for the feedback. Will do.
@Kashi_Mochibean
@Kashi_Mochibean 8 ай бұрын
I just found this randomly. But it's the most wonderfully-subtly-obvious and nerdiest way I've ever been asked for views and subscriptions. So I'm hitting the button
@giraffa-analytics
@giraffa-analytics 2 ай бұрын
Linear regression is a bad choice for this kind of data. This is a time series problem. cumulative sums introduce autocorrelation between datapoints, which violates the assumption of iid residuals of linear regression. Code ok, reasoning not.
@starship9629
@starship9629 Ай бұрын
Exactly
@NicholasRenotte
@NicholasRenotte Жыл бұрын
Rob that keyboard cam is 🔥
@robmulla
@robmulla Жыл бұрын
Thanks Nick. This was my old setup where I had an old webcam precariously attached to a mic stand. It would fall over about once an hour 😂 I need to get your opinion on cameras. Recently invested in better lighting but feel like I’m doing something wrong. Your videos are top notch.
@NicholasRenotte
@NicholasRenotte Жыл бұрын
@@robmulla LOL i've been there, the ol' jerry rigged camera setup 😂. Elgato Multi-Mount arms are a lifesaver!!
@thespicycabbage
@thespicycabbage Жыл бұрын
you should be using time series
@Malzie31
@Malzie31 2 жыл бұрын
Love these!! I’ve seen two and they are excellent ideas and useful
@robmulla
@robmulla 2 жыл бұрын
Thanks for the feedback. My first attempts at making shorts. It’s really hard to keep it under a minute.
@broxxad
@broxxad Жыл бұрын
Ey, you should only expect logarithmic regression with your awesome contents.
@robmulla
@robmulla Жыл бұрын
Haha. Thanks!
@Ligress
@Ligress Жыл бұрын
Exponential
@h44r96
@h44r96 Жыл бұрын
Well said 👍
@broxxad
@broxxad Жыл бұрын
@@Ligress logarithmic sounds more realistic.
@Ligress
@Ligress Жыл бұрын
@@broxxad Fine, by the way Do you work in Data feild
@boimchartis
@boimchartis 2 жыл бұрын
Nice video bro👍👍
@robmulla
@robmulla 2 жыл бұрын
Glad you liked it
@halkkoi1538
@halkkoi1538 2 жыл бұрын
Wow you are so amazing bro
@robmulla
@robmulla 2 жыл бұрын
Thanks Halk!
@CaribouDataScience
@CaribouDataScience 2 жыл бұрын
You misspelled Ggplot2 😅
@robmulla
@robmulla 2 жыл бұрын
No, I think I got it right. 😉
@kadourkadouri3505
@kadourkadouri3505 Жыл бұрын
don't you think a nonlinear least squares model would better fit this data ?
@robmulla
@robmulla Жыл бұрын
Great question. It may be!
@starship9629
@starship9629 Ай бұрын
​@@robmullaOf course it is. Your data is clearly non-linear by looking at it. Yet you're trying to fit it with a linear model. And even worse, you are treating it as a time-series which makes no sense as linear regression models can not capture temporal dependencies. You should stop making videos on topics you have no idea about and present yourself as an authority in areas you have no idea about. It's very unprofessional and misleading.
@yunuskaratepe
@yunuskaratepe 8 ай бұрын
I don't understand the idea behind the keyboard cam but cool video :)
@bashar9200
@bashar9200 Жыл бұрын
Thank you for such wonderful content!! I learn a lot from your codes
@robmulla
@robmulla Жыл бұрын
Thanks for watching
@eron1633
@eron1633 Жыл бұрын
I'm kinda new in python and programming,and which interface did you use in this video?)
@robmulla
@robmulla Жыл бұрын
I'm using jupyter lab. I have an intro video that would be perfect for you here: kzbin.info/www/bejne/a6HJYZKYpbOVodk
@zabeardybeardy232
@zabeardybeardy232 Ай бұрын
Yes, your views correlate with the fact that the next day rolls over....
@hasijasanskar
@hasijasanskar 2 жыл бұрын
October -> September :)
@shivayshakti6575
@shivayshakti6575 Жыл бұрын
👍
@robmulla
@robmulla Жыл бұрын
🙌
@Satyam1010-N
@Satyam1010-N Жыл бұрын
Reading regression analysis books 😅 .
@1_lloyd_146
@1_lloyd_146 2 жыл бұрын
Good work, but im curious what is day_count, is it the total of days or sth? Also, I rll want to have the dataset of this if it doesnt bother you
@robmulla
@robmulla 2 жыл бұрын
Thanks. I don’t have this dataset public but I do have another video on exploratory data analysis where I go over a similar dataset which I make public. Check that one out. I think day count is just a increasing number since the day the channel started.
@1_lloyd_146
@1_lloyd_146 2 жыл бұрын
@@robmulla Tysm! That’s super helpful
@jensenholm2361
@jensenholm2361 9 ай бұрын
Wow that’s the most linear dataset I’ve ever seen
@robmulla
@robmulla 9 ай бұрын
Not any more :D
@gustavomaia2252
@gustavomaia2252 11 ай бұрын
Now you have learned that the skicit learn developers know how to do a linear regression 😊
@viewsfromthechris7810
@viewsfromthechris7810 Жыл бұрын
Looks like you got way more than the prediction lol!
@robmulla
@robmulla Жыл бұрын
Yep :D
@bhargavapothakamuri4218
@bhargavapothakamuri4218 6 ай бұрын
I am getting value error when I run on my 2D CSV, with 2 columns “date” and “value”, during model.fit(x,y)
@starship9629
@starship9629 Ай бұрын
Pro-tip: Don't learn statistics from this guy. And use OLS instead. That will resolve your problem
@akankshashrivastava100
@akankshashrivastava100 11 ай бұрын
Do you teach the same?
@Belawithnoalcohol
@Belawithnoalcohol 10 ай бұрын
This is October, so how is it so far?
@SayoojGarrix
@SayoojGarrix 8 ай бұрын
83k. So regression miserably failed 😂
@user-kp9si1km6g
@user-kp9si1km6g Жыл бұрын
How to write gta 6 on python, just import gta6 lib
@robmulla
@robmulla Жыл бұрын
Pretty much. Import and add 1.
@primary4075
@primary4075 9 ай бұрын
Nah.... You forgot normality test
@lukas8385
@lukas8385 Жыл бұрын
How to linear regression: step 1 import linear regression -.-
@robmulla
@robmulla Жыл бұрын
Yep! You’ve got the hang of it!
@gokayfem
@gokayfem Жыл бұрын
did you get 100k views?
@robmulla
@robmulla Жыл бұрын
Yes I did! As of today (Oct 20) I'm at 387k views. Thanks for watching.
@bharathraj221
@bharathraj221 7 ай бұрын
Filenotfounderror😢
@starship9629
@starship9629 Ай бұрын
Well do you have his dataset on your computer?
@starship9629
@starship9629 Ай бұрын
You need to take this video down. You're misleading people
Internet is going wild over this problem
9:12
MindYourDecisions
Рет қаралды 170 М.
Meet the one boy from the Ronaldo edit in India
00:30
Younes Zarou
Рет қаралды 17 МЛН
天使救了路飞!#天使#小丑#路飞#家庭
00:35
家庭搞笑日记
Рет қаралды 91 МЛН
WHO CAN RUN FASTER?
00:23
Zhong
Рет қаралды 44 МЛН
КТО ЛЮБИТ ГРИБЫ?? #shorts
00:24
Паша Осадчий
Рет қаралды 1,6 МЛН
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 267 М.
Linear Regression From Scratch in Python (Mathematical)
24:38
NeuralNine
Рет қаралды 167 М.
All Learning Algorithms Explained in 14 Minutes
14:10
CinemaGuess
Рет қаралды 222 М.
R vs Python
7:07
IBM Technology
Рет қаралды 319 М.
ML Was Hard Until I Learned These 5 Secrets!
13:11
Boris Meinardus
Рет қаралды 279 М.
Time Series Forecasting with XGBoost - Advanced Methods
22:02
Rob Mulla
Рет қаралды 119 М.
Learn Statistical Regression in 40 mins! My best video ever. Legit.
40:25
Linear Regression, Clearly Explained!!!
27:27
StatQuest with Josh Starmer
Рет қаралды 239 М.
Linear Regression in Python - Full Project for Beginners
50:52
Alejandro AO - Software & Ai
Рет қаралды 18 М.
Meet the one boy from the Ronaldo edit in India
00:30
Younes Zarou
Рет қаралды 17 МЛН