3.2: Linear Regression with Ordinary Least Squares Part 1 - Intelligence and Learning

Поделиться
HTML-код
  • Опубликовано: 10 окт 2024

Комментарии • 221

  • @alexstringer7786
    @alexstringer7786 Месяц назад +1

    my ridiculously expensive college course can't even get close to the brilliantly entertaining and succinct way you describe things at 1.75x speed haha - thank you so much!

  • @adamlanghans
    @adamlanghans 7 лет назад +183

    Subbed for multiple color markers.

  • @RodamisCZ
    @RodamisCZ 7 лет назад +473

    I have linear depression

    • @112BALAGE112
      @112BALAGE112 7 лет назад +12

      Happiness goes straight down.

    • @extradimension7356
      @extradimension7356 7 лет назад +5

      If you don't find help it can be iterative problem

    • @kayinb90
      @kayinb90 4 года назад +1

      😂 me too lmfao

    • @MrBollec
      @MrBollec 4 года назад +3

      I hope that slope was negative ;)

  • @JFrameMan
    @JFrameMan 5 лет назад +8

    Great explanation. You're the only channel that has such a nice balance between explaining academic content and programming it.

  • @whatsup7341
    @whatsup7341 7 лет назад +44

    "I'm really sorry, I'm going to do this in Fahrenheit, I have to apologize for that. I'll happily say "maths" though." You crack me up Dan

  • @ipointmistakes
    @ipointmistakes 7 лет назад +1

    Dan, you are precisely the one, that our education institutions currently need, simply amazing way of making anyone understand even the most complex stuff

  • @clabe45
    @clabe45 7 лет назад +20

    Nice job re-capping the marker as you said "recap" at 14:22.

  • @Oompie279
    @Oompie279 7 лет назад +16

    Nice video! The numerator of the expression for the slope is actually the sample covariance of X and Y. Sample covariance is a measure of linear dependence. The denominator is the sample variance of X. So the slope is loosely said the linear dependence of X and Y, normalized by the variability in X. Hope that makes sense!

  • @sidindian1982
    @sidindian1982 2 года назад +2

    ordinary least Square .. Very well explained Sir :-) ... i am preparing for data science as my carrier ...

  • @JoseLopez-oz5tn
    @JoseLopez-oz5tn Год назад

    6 years later and this content is helping me out

  • @jude_ghenon
    @jude_ghenon 4 года назад +4

    Great job! This is the nth video of yours I've watched and you've been able to explain hard concepts like AI algorithms like they were nuts! It seems they're so easy and I don't know if you're too good to explain or I'm so dumb I'm not catching the things right.

  • @borismilenski4759
    @borismilenski4759 7 лет назад +1

    I wish you had a teacher like yourself. If I were to compare this video to the entirety of what I learnt from my "programming" classes, I'd say I have wasted too many hours in said classes.

  • @lucasmontec
    @lucasmontec 7 лет назад

    You are the best teacher I've ever had. Seriously. And I've had a LOT of them.

  • @synju
    @synju 7 лет назад

    Please BIG Please, continue with this series.
    I've followed along with your genetic algorithms, and now I'm busy with neural networks, so please continue with this.
    Would really appreciate it.

  • @wookotech4216
    @wookotech4216 5 лет назад +1

    I am smiling now...I was very confused till i watched your explanation. Thank you Sir!

  • @im_karamo1907
    @im_karamo1907 6 лет назад +5

    heehhhe.. bro honestly you have win my day. your sense of humor makes me understand it greatly. congrats again. hehe

  • @rapi1975
    @rapi1975 6 лет назад +5

    Thanks for the video. finally easy explanation of linear regression.

  • @jaykfrisby8163
    @jaykfrisby8163 3 года назад

    Thanks for the video. your demeanor really brightened my day.

  • @omkarfadtare3054
    @omkarfadtare3054 2 года назад +2

    Bro, this is so much fun to learn.. Thank you.. you explained it very well.. you really deserve a like and a subscribe

  • @amranmohamed377
    @amranmohamed377 2 года назад

    I wish I had teacher like this.

  • @jadlteif8143
    @jadlteif8143 7 лет назад +2

    Very neat explanation, explains the basics very well. Keep up the good work :)

  • @thevinaymittal.
    @thevinaymittal. 7 лет назад +1

    Great work sir, You have an art of teaching with fun.

  • @h.sharathkumar1889
    @h.sharathkumar1889 5 лет назад

    You are just awesome.
    ..so intelligent yet humble.

  • @zexivic7740
    @zexivic7740 4 года назад +1

    After googling for what I needed to know to do my project I have ended up on this video and channel learning about OLS. Although it did help me to understand better what is OLS I do't think I can do this on my own. It would be cool if anyone from the comment section or Daniel could help me out with my problem.
    So, I'm trying to create a math solution that would give me soccer players post game ratings based on the actions done during the game. It seems that googling is keeping me in a loop around Linear Regression, as it seems that such math model has been used, in combination with some others, to do a real life predictions and post game rating for soccer players by various online sites and soccer journals. The system I would like to create, first and foremost as a math model and then later as an actual code, would be fed by 30+ events (goals, assists, block, saves, etc) that should quantify all of that as a number on a scale from 1 to 10 with 2 decimal points as a precision. Is OLS the right way to go? Perhaps other Linear Regression model? Maybe totally different math model and a formula? Where do I event start when I do pick a model? Decide how much of these actions are worth and then fit them in the model? Any help would be great. Thanks.

  • @agusnoviana
    @agusnoviana Год назад

    u make math interesting for ur student..good job sir

  • @paulkerrigan9857
    @paulkerrigan9857 4 года назад +1

    You’re one of my heroes, man. Seeing you make these coding videos years ago inspired me to learn new languages and technologies. Playing with P5.js is lots of fun.

  • @shankarkarthik
    @shankarkarthik 6 лет назад +1

    Amazing video - Your videos are the best dumb (dumb being me) it down versions I have found in ML. Thank you very much

  • @gigelfranaru
    @gigelfranaru 7 лет назад +1

    Presumably you either want to go from i = 1 to n in x_bar, or divide by (n+1), since there are n+1 terms in that sum (from 0 to n)

  • @robertop.556
    @robertop.556 Год назад

    Wow. You're awesome. I was able to understand linear regression with your video.

  • @tenou213
    @tenou213 7 лет назад

    Oh. Oh wow, I never saw it when I actually studied stats but it looks like this is where the i=0 to n loop counter convention comes from. If the relationship isn't that direct it's still very similar and helps my understanding.

  • @datasciencegyan5145
    @datasciencegyan5145 3 года назад

    it gives degree of freedom to move the line-up and down when plotting on the line using data points

  • @ankitasaxena5891
    @ankitasaxena5891 2 года назад +1

    With this level of hotness he can teach me anything 🔥

  • @lelsewherelelsewhere9435
    @lelsewherelelsewhere9435 4 года назад

    @11:17 "...all of the X-files[viles?], values..." lol
    Just shows how your brain is always making connections everywhere!
    Great videos! Your stuff always makes my day :)

    • @lelsewherelelsewhere9435
      @lelsewherelelsewhere9435 4 года назад

      Also as another commenter said, "just to recap for a second" while recapping the marker 14:22. Making connections everywhere!

  • @trickyabb
    @trickyabb 6 лет назад +3

    It all makes sense now thank you for saving the day and you make learning fun :)

  • @climito
    @climito Год назад

    I already said this, but this man is gold

  • @adilkhatri7475
    @adilkhatri7475 6 лет назад

    one of the best explanation on linear regression! thank you!

  • @hollykm
    @hollykm 2 года назад

    his vibes are off the charts

  • @ordinarycoder8090
    @ordinarycoder8090 7 лет назад +7

    Sir your videos are amaizing.

  • @kaartiikvijayan1623
    @kaartiikvijayan1623 5 лет назад

    I was having trouble understanding this. Thanks to you I get it now!!

  • @midwinter78
    @midwinter78 7 лет назад +43

    "I head there's this channel, with tutorials and a whiteboard, where they use multiple colours". Check out blackpenredpen.

  • @DamianReloaded
    @DamianReloaded 7 лет назад

    Great explanation! Super straightforward! 10 / 10 !

  • @angelrai4897
    @angelrai4897 4 года назад

    Thank you so much,this lecture has become really helpful to me

  • @ManAcadie
    @ManAcadie 3 года назад

    I heard this guy used multiple colours. Subscribed.

  • @willykitheka7618
    @willykitheka7618 4 года назад +1

    I just ❤ love your energy!

  • @neilbolima9694
    @neilbolima9694 6 лет назад

    Thank you AP Stat. I actually understood all of this

  • @TNGOMinecraft
    @TNGOMinecraft 7 лет назад

    Squaring the values also has a different effect. If the line is somewhere between two points and you don't square, it doesn't care where the line is, the distance is always the sum of the two points. If you take the square though it changes that. Let's say there are two point 10 away from each other. The line could be directly on one of these points, the total distance is still 10 to the line from both points but the sum of the quare distance is 100. If the line is directly in the middle you have two times a distance of 5. Again just sum of distance is 10 but the square distance suddenly just ist 2 * (5 ^ 2) which is 50. That's why squaring it makes sense. 6:50

  • @somakkamos
    @somakkamos 6 лет назад +4

    not sure i understand how the final slope formula (m) arrived. formula for a slope is rise/run i.e. (y2-y1)/(x2-x1). how did we get the value of slope as the final formula shown as summation

  • @willykitheka7618
    @willykitheka7618 4 года назад

    You're an awesome teacher!

  • @MadSandman
    @MadSandman 7 лет назад +4

    You're awesome! I love your videos, they're always really interesting ! Big up from France :p

  • @MacAttack888
    @MacAttack888 7 лет назад +1

    Great stuff as always! I appreciate you covering this statistical content :)

  • @krzysztofkuliga2148
    @krzysztofkuliga2148 6 лет назад

    Amazing presentation, Thanks!

  • @Remls
    @Remls 7 лет назад

    Needs more "this."

  • @AlchemyOfDeathBand
    @AlchemyOfDeathBand 7 лет назад +2

    If n is the total, shouldn't i run from 0 to n-1 ?
    Otherwise, great videos and attitude ! Subbed.

  • @wise_394
    @wise_394 Год назад

    Thank you so much you saved me

  • @sajithmarlon9489
    @sajithmarlon9489 4 года назад

    It was very helpful

  • @pauldominic2964
    @pauldominic2964 8 месяцев назад

    U are a great teacher ❤😂

  • @sreeharsha1047
    @sreeharsha1047 4 года назад

    Your videos are great❣ I'm new to ML
    Can you please rearrange the series for ML so that it is not messy please

  • @miliano777
    @miliano777 Год назад

    awesome I needed this

  • @Pylsng
    @Pylsng 4 года назад

    Thanks for this video, you are really good

  • @mohabibrahime7397
    @mohabibrahime7397 4 года назад

    awesome video. thank you for sharing your knowledge was well as your jokes with us. you are GREAT

  • @harshitsharma589
    @harshitsharma589 4 года назад

    fun learning with you always :)

  • @jfr9964
    @jfr9964 5 лет назад +3

    there's already a channel on RUclips that is called "blackpenredpen" and he uses black and red markers to explain math

  • @lewiscrosby2074
    @lewiscrosby2074 7 лет назад +22

    In the uk our general equation of a line is y=mx+c. Whichever country changed it is just petty 😂

    • @gioni_mango
      @gioni_mango 7 лет назад +2

      Lewis Crosby Belgium here, we use y=mx+p or ax+b

    • @guygeva7375
      @guygeva7375 7 лет назад +1

      third degree: y=ax^3+bx^2+cx+d
      second degree: y=ax^2+bx+c
      first degree: y=mx+b
      *sigh*
      You probably have it as c because they wanted it to be similiar to second degree formulas or something. who knows :P

    • @sonicsalies
      @sonicsalies 7 лет назад

      Brazil: ax + b

    • @stn4873
      @stn4873 6 лет назад +3

      in my room y= z! + v?

    • @ThePlayerNotJump1
      @ThePlayerNotJump1 6 лет назад +3

      India uses y=mx+c as well... Pretty sure we all know why... Thanks English people :D

  • @tjcraft7233
    @tjcraft7233 7 лет назад +1

    i have an idea : sometimes you write off the board so to make sure that you don't you could just draw a line to mark the limits of your draw-maths zone ?!
    (it would ony work if you place your camera always at the same place) =p
    PS : i love what you do =) please carry on !!! =D

  • @gurvirbaraich2028
    @gurvirbaraich2028 Год назад

    Its "mx + c" where
    m is gradient
    b is y intercept

  • @guygeva7375
    @guygeva7375 7 лет назад +3

    I ressubed for the multicolored markers.
    Defenatly didn't unsub earlier just to do this. Most defenatly not.

  • @JyoPari
    @JyoPari 7 лет назад

    You should try an LSTM for regression, since they are good for time series data

  • @truthseer7904
    @truthseer7904 5 лет назад

    I would love to have you as my lecturer for all my units. You have a gift in teaching

  • @flader_lol
    @flader_lol 5 лет назад

    My man, you're a beast!

  • @huraibyel-huraiby7462
    @huraibyel-huraiby7462 3 года назад

    Love it 😂 04:17

  • @gibsonrobb
    @gibsonrobb 4 года назад

    Awesome video! Entertaining. Keep up the awesome job =)

  • @stancydube5268
    @stancydube5268 6 лет назад

    AMAZINGGG So helpful sir .Thank you sooooo much

  • @ThelarionMusic
    @ThelarionMusic 4 года назад

    What a freakin great video :D Thank you!

  • @liminal18
    @liminal18 7 лет назад

    Thanks. Keep it up.

  • @rafainfernal
    @rafainfernal 7 лет назад

    Could you please make a coding challenge where you code a cylindrical coordinate simulator aplet? The aplet should be in 3d and have sliders for adjusting the radius, angle and height. It should be entertaining and cool to program

  • @Pawan-tc2ih
    @Pawan-tc2ih 3 года назад +1

    where is the error term??

  • @fielddog8111
    @fielddog8111 2 года назад

    I need to relate the data points to the best fit line in terms of land surveying where the data points are perpendicular to the best fit line. This is true for land surveying where the data points represent property corners and would be left or right of the best fit line. Your video shows the data points directly south (Y-axis) of the best fit line. How do I relate your example to my needs?

  • @crazyjpr2009
    @crazyjpr2009 6 лет назад

    very nicely explain :)

  • @christianfernandez7385
    @christianfernandez7385 6 лет назад

    I reallly enjoy your videos, you are really amazing

  • @vijaykumarkari
    @vijaykumarkari 7 лет назад

    nice video..liked it a lot

  • @xzencombo3400
    @xzencombo3400 7 лет назад +2

    Great teacher, everything is the best...Will you makr anything in C++ because you said in livestream you know it. But, can you makr an OO C++ Serial? I am really good in C++, but I can't understand classes, because I don't know why not to write single void, instead to make a full class. Can you please do something in C++?

    • @xzencombo3400
      @xzencombo3400 7 лет назад

      Btw. I am first :)

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +2

      I've got a long list of things to get to, but I'm not opposed to doing C++ at some point. Maybe I can get some guest tutorials on this topic.

    • @xzencombo3400
      @xzencombo3400 7 лет назад

      Ahh, ok then...Btw. ty for replying :)

    • @dhritimanbose2186
      @dhritimanbose2186 7 лет назад

      xZen combo

  • @prachikhandelwal2259
    @prachikhandelwal2259 4 года назад +1

    I become the fan of your way of teaching :)
    Do you have any online courses on Udemy?

  • @practicalsoftwaremarcus
    @practicalsoftwaremarcus 7 лет назад

    Looking forward for next videos on this subject!

  • @FerdousHasan-kk8hp
    @FerdousHasan-kk8hp 2 года назад

    If the difference is positive and negative then wouldn't adding them up minimize the residual value? Why square them?

  • @eduardusadrian225
    @eduardusadrian225 3 года назад

    This guy is legit bruh

  • @mrrubixcubeman
    @mrrubixcubeman 7 лет назад

    Wouldn't you square the values because if you have 2 points and you want to find the point where the distance to each point added is smallest, it doesn't matter where you try the point as long as it is on the line connecting the points. If you square the distances, however, the longer distances will count for more than the small distances (I think you know what I mean) and the added distance will be different. Otherwise, it would use less memory and make the program faster if you just took the absolute value. Thanks!

  • @nagesh007
    @nagesh007 Год назад

    Awesome

  • @Kaixo
    @Kaixo 7 лет назад

    Hey! I'm looking for some fun challenges in javascript, do you have any challenges you'd recommend?
    p.s. I watched the live stream in which you made this video, and you mentioned Tetris. I made it in like a day, so you probably can in one video :P Would be cool to see you make it!

    • @Blazeorite
      @Blazeorite 7 лет назад

      Kaixo Music is java script the most fun language?

    • @Kaixo
      @Kaixo 7 лет назад

      Idk, It's the second (third if you count HTML) language I learned... the first one was C. So I don't really know...

  • @adwaitraste8904
    @adwaitraste8904 7 лет назад

    Epic dab at 3:50 😂😂

  • @ShahnewazKhan
    @ShahnewazKhan 6 лет назад

    perfect!

  • @kerolesmonsef4179
    @kerolesmonsef4179 6 лет назад +1

    wow you are great man keep going like this :)

  • @Blazeorite
    @Blazeorite 7 лет назад

    What do you have to major in college to cover this topic? Cuz this stuff is pretty cool

  • @thehappycoder3760
    @thehappycoder3760 2 года назад

    Great

  • @leilachaltu2314
    @leilachaltu2314 Год назад

    a very interesting guy

  • @ousseynoudiagne2557
    @ousseynoudiagne2557 7 лет назад

    Please make video using electron js .

  • @MrWabouz
    @MrWabouz 7 лет назад

    Could you give a link to the proof of the slope formula ?

  • @shsh09608
    @shsh09608 6 лет назад

    I hate economics but I like your lecture. Thanks!

  • @cheewanng6138
    @cheewanng6138 4 года назад

    OoooKKKK, I got a sudden shocked by the opening casual kiddy music...

  • @fabianstutzle9769
    @fabianstutzle9769 5 лет назад

    If you calculate the sum (for x or for m), shouldnt it always be from 1 to n instead of 0 to n?

  • @abdullaalmannaei8641
    @abdullaalmannaei8641 4 года назад

    I passed two courses about econometrics, and just realized why it is called " ORDINARY LEAST SQUARE!".

    • @pranaypurohit7855
      @pranaypurohit7855 4 года назад

      Can you suggest me a good econometrics book I have my exams in 20 days.