Learn about Linear Regression in python in this short! #python #datascience #shorts
Пікірлер: 82
@jaehuilim74674 ай бұрын
An excellent illustration of Overfitting
@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Ай бұрын
Isn't it underfitting? The model is too simplistic for the data points. A second degree equation will work a lot better.
@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Ай бұрын
@@zabeardybeardy232Yes. Linear models can not fit on non-linear data hence they have low complexity. Low complexity = underfitting
@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.
@asdeEducation2 жыл бұрын
I hope I remember come back to this video in October
@robmulla2 жыл бұрын
Haha. Set a reminder! Hopefully we can beat the forecast!
@kartikgoswami Жыл бұрын
Its November
@nirjalkumarmahato330 Жыл бұрын
It's January
@nirjalkumarmahato330 Жыл бұрын
It's February 🙃
@alirezouali3119 Жыл бұрын
It’s march
@ferrychandra99349 ай бұрын
Now do this without libraries, except Matplotlib and Pandas 😂
@David-hl9iv8 ай бұрын
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.
@paulantoni19344 ай бұрын
Yeah but then we could just go for polynomial regression.
@spazeasterix67233 ай бұрын
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_1462 жыл бұрын
Btw, I rlly love this type of video, so make more videos of linear and nonlinear regression plsssss
@robmulla2 жыл бұрын
Thanks for the feedback. Will do.
@Kashi_Mochibean8 ай бұрын
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-analytics2 ай бұрын
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Ай бұрын
Exactly
@NicholasRenotte Жыл бұрын
Rob that keyboard cam is 🔥
@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 Жыл бұрын
@@robmulla LOL i've been there, the ol' jerry rigged camera setup 😂. Elgato Multi-Mount arms are a lifesaver!!
@thespicycabbage Жыл бұрын
you should be using time series
@Malzie312 жыл бұрын
Love these!! I’ve seen two and they are excellent ideas and useful
@robmulla2 жыл бұрын
Thanks for the feedback. My first attempts at making shorts. It’s really hard to keep it under a minute.
@broxxad Жыл бұрын
Ey, you should only expect logarithmic regression with your awesome contents.
@robmulla Жыл бұрын
Haha. Thanks!
@Ligress Жыл бұрын
Exponential
@h44r96 Жыл бұрын
Well said 👍
@broxxad Жыл бұрын
@@Ligress logarithmic sounds more realistic.
@Ligress Жыл бұрын
@@broxxad Fine, by the way Do you work in Data feild
@boimchartis2 жыл бұрын
Nice video bro👍👍
@robmulla2 жыл бұрын
Glad you liked it
@halkkoi15382 жыл бұрын
Wow you are so amazing bro
@robmulla2 жыл бұрын
Thanks Halk!
@CaribouDataScience2 жыл бұрын
You misspelled Ggplot2 😅
@robmulla2 жыл бұрын
No, I think I got it right. 😉
@kadourkadouri3505 Жыл бұрын
don't you think a nonlinear least squares model would better fit this data ?
@robmulla Жыл бұрын
Great question. It may be!
@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.
@yunuskaratepe8 ай бұрын
I don't understand the idea behind the keyboard cam but cool video :)
@bashar9200 Жыл бұрын
Thank you for such wonderful content!! I learn a lot from your codes
@robmulla Жыл бұрын
Thanks for watching
@eron1633 Жыл бұрын
I'm kinda new in python and programming,and which interface did you use in this video?)
@robmulla Жыл бұрын
I'm using jupyter lab. I have an intro video that would be perfect for you here: kzbin.info/www/bejne/a6HJYZKYpbOVodk
@zabeardybeardy232Ай бұрын
Yes, your views correlate with the fact that the next day rolls over....
@hasijasanskar2 жыл бұрын
October -> September :)
@shivayshakti6575 Жыл бұрын
👍
@robmulla Жыл бұрын
🙌
@Satyam1010-N Жыл бұрын
Reading regression analysis books 😅 .
@1_lloyd_1462 жыл бұрын
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
@robmulla2 жыл бұрын
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_1462 жыл бұрын
@@robmulla Tysm! That’s super helpful
@jensenholm23619 ай бұрын
Wow that’s the most linear dataset I’ve ever seen
@robmulla9 ай бұрын
Not any more :D
@gustavomaia225211 ай бұрын
Now you have learned that the skicit learn developers know how to do a linear regression 😊
@viewsfromthechris7810 Жыл бұрын
Looks like you got way more than the prediction lol!
@robmulla Жыл бұрын
Yep :D
@bhargavapothakamuri42186 ай бұрын
I am getting value error when I run on my 2D CSV, with 2 columns “date” and “value”, during model.fit(x,y)
@starship9629Ай бұрын
Pro-tip: Don't learn statistics from this guy. And use OLS instead. That will resolve your problem
@akankshashrivastava10011 ай бұрын
Do you teach the same?
@Belawithnoalcohol10 ай бұрын
This is October, so how is it so far?
@SayoojGarrix8 ай бұрын
83k. So regression miserably failed 😂
@user-kp9si1km6g Жыл бұрын
How to write gta 6 on python, just import gta6 lib
@robmulla Жыл бұрын
Pretty much. Import and add 1.
@primary40759 ай бұрын
Nah.... You forgot normality test
@lukas8385 Жыл бұрын
How to linear regression: step 1 import linear regression -.-
@robmulla Жыл бұрын
Yep! You’ve got the hang of it!
@gokayfem Жыл бұрын
did you get 100k views?
@robmulla Жыл бұрын
Yes I did! As of today (Oct 20) I'm at 387k views. Thanks for watching.
@bharathraj2217 ай бұрын
Filenotfounderror😢
@starship9629Ай бұрын
Well do you have his dataset on your computer?
@starship9629Ай бұрын
You need to take this video down. You're misleading people