The Chain Rule
Vložit
- čas přidán 19. 06. 2024
- The Chain Rule is a method for finding complex derivatives and is used all the time in Statistics and Machine Learning. This video breaks it down into its two simple pieces and shows you how they easily come together. We then use the Chain Rule to solve a common Machine Learning problem - optimizing the Residual Squared Loss Function.
English
This video has been dubbed using an artificial voice via aloud.area120.google.com to increase accessibility. You can change the audio track language in the Settings menu.
Spanish
Este video ha sido doblado al español con voz artificial con aloud.area120.google.com para aumentar la accesibilidad. Puede cambiar el idioma de la pista de audio en el menú Configuración.
Portuguese
Este vídeo foi dublado para o português usando uma voz artificial via aloud.area120.google.com para melhorar sua acessibilidade. Você pode alterar o idioma do áudio no menu Configurações.
For a complete index of all the StatQuest videos, check out:
statquest.org/video-index/
If you'd like to support StatQuest, please consider...
Buying my book, The StatQuest Illustrated Guide to Machine Learning:
PDF - statquest.gumroad.com/l/wvtmc
Paperback - www.amazon.com/dp/B09ZCKR4H6
Kindle eBook - www.amazon.com/dp/B09ZG79HXC
Patreon: / statquest
...or...
CZcams Membership: / @statquest
...a cool StatQuest t-shirt or sweatshirt:
shop.spreadshirt.com/statques...
...buying one or two of my songs (or go large and get a whole album!)
joshuastarmer.bandcamp.com/
...or just donating to StatQuest!
www.paypal.me/statquest
Lastly, if you want to keep up with me as I research and create new StatQuests, follow me on twitter:
/ joshuastarmer
0:00 Awesome song and introduction
2:02 A super simple example
6:32 A slightly more complicated example
9:16 The Chain Rule when the relationship is not obvious
11:47 The Chain Rule for the Residual Sum of Squares
Corrections:
13:05 When the residual is negative, the pink circle should be on the left side of the y-axis. And when the residual is positive, the pink circle should be on the right side.
#StatQuest #TheChainRule #DubbedWithAloud
Support StatQuest by buying my book The StatQuest Illustrated Guide to Machine Learning or a Study Guide or Merch!!! statquest.org/statquest-store/
Corrections:
13:05 When the residual is negative, the pink circle should be on the left side of the y-axis. And when the residual is positive, the pink circle should be on the right side.
This is an amazing explanation!!! Thanks
@@adolfocarrillo248 Thank you very much! :)
Got my copy of The StatQuest Illustrated Guide to Machine Learning today! Quadruple BAM!!!!
@@anushreesaran Hooray! Thank you very much! :)
@@statquestwhat do mean by the last term not containing the intercept?
I have started my machine learning journey a month ago and I stumbled onto a myriad of resources that explain linear models using the RSS function but no one, and I mean no one, managed to explain it with as much clarity and elegance as you have in just under 20 minutes. You sir are a boon to the world.
Thank you!
Man you are amazing. You should get a Nobel prize!
Thank you! :)
Agree!
more than a nobel! book bought
Yes Yes Yes
Or a Grammy!
Amazing pedagogy. Slow pace , short setences , visuals consistent with the talk. great job ;-) Thanks
Glad you liked it!
Nobody:
The demon in my room at 3am: 7:56
Dang! :)
jesus, this was funny xD
Did I just UNDERSTAND the CHAIN RULE ? SURREAL, thank you!
:)
Over the past three years, I have been studying neural networks and delving into the world of coding. However, despite my best efforts, I struggled to grasp the true essence of this complex subject. That is until I stumbled upon your enlightening video.
I cannot emphasize enough how much your video has helped me. It has shed light on the intricate aspects of neural networks, allowing me to comprehend the subject matter with greater clarity and depth. The way you presented the material was truly remarkable, and it made a profound impact on my understanding.
What astounds me even more is that you provide such valuable content for free. It is a testament to your passion for educating and empowering individuals like myself. Your dedication to spreading knowledge and fostering learning is truly commendable.
Thanks to your channel, I have been able to unlock the true essence of mathematics and its relationship with neural networks. The confidence and clarity I now have in this subject are invaluable to my personal and professional growth.
Your video has been a game-changer for me, and I am grateful beyond words. Please continue your fantastic work and know that your efforts are deeply appreciated.
Thank you very much! BAM! :)
BY FAR the best explanation of the chain rule I have ever seen (and trust me - I've seen A LOT)
You, sir, just earned yourself yet another well-deserved subscriber.
F'n brilliant!!!
Thank you very much!!! BAM! :)
As someone who is doing medical research and needs to learn little-by-little about statistics, neural networks and machine learning as my project goes on, your channel is a literal life-saver! It has been so hard to try to keep my M.D. stuff together with my PhD research all the while learning statistics, programming and neural network structures and machine learning. Trying to arrange courses from my uni to fit in with all the other stuff is simply impossible, so I've been left to my own devices and find a way to gain knowledge about said subjects and your channel has done just that.
Your teaching is great and down-to-earth enough to be easily grasped, but you also delve deep into the subject after the initial baby steps, so the person watching isn't just left with "nice to know"-infobits. Love it! Keep up the great work!
Thank you!
Awesome!! None of my math teachers in high school or collage never explained to me WHY chain rule works this way. but you explained it with a very simple example. I'm certain that from now on I'll never forget the chain rule formula. Thanks a million. 👌✔
BAM! :)
I am Biostatistician, proclaiming that you are really a good teacher.
Thank you very much!
Guess I will not be afraid of the ***THE CHAAAAAINNNN RULE***
Thank you, Josh! Always Waiting for your videos!
Bam! :)
The way you link equations to visuals and show how everything is working along with the math at the SAME time. Beautiful, elegant, easy to follow.
Wow, thank you!
dear @stat quest you must have come from heaven to save students from suffering's
just unbeliable explanation
Thank you! :)
Best chain rule explanation i have ever seen.
Thank you!
this channel was suggested by my professor, and i always watch the videos while doing a machine learning tasks. Big appreciate to you :D
Cool, thanks!
If I watched your videos during my college, my career trajectory would be totally different. BIG BAM!!!!
Thanks!
I love StatQuest! I got my SQ mug in the morning and just got the Illustrated Guide to Machine Learning. Super excited to start! Thank you for all the great content!
That is awesome! TRIPLE BAM!!!! :)
We could have had a "dreaded terminology alert" : "decomposition of functions". But even without it: this was a perfect explanation of the chain rule , with great practical examples. Bravo, Josh!
Thank you!
Josh you are a master in teaching, you make difficult topics so easy to understand which is really amazing. My mother language is not English but you explain so well and clear that I can understand everything. Congratulations Sir, please keep doing this job.
Thank you very much! :)
This is probably the best video about on the internet!! Thank you so much for taking the time to do it!!
Glad it was helpful!
Very clear explanation. I saw different people explaining this topic but you are the best.
Thank you so much.
Thank you!
I would insert a BAM at 5:25. :) ...also, I realized the thing I like about your videos is you explain things, not only in a clear way, but in a different way. It adds to the depth of our understanding. Thank you!
That is definitely a BAM moment! And thank you. One of my goals is to always explain things in a different way, so I'm glad you noticed! :)
you have great videos that help explain a lot of concepts very clearly, step by step. You have help a lot of students for sure.
Thank you very much! :)
such a clean and simple explanation! can't wait for more Math and Statistic videos. You are the awesomeness in CZcams!
Thank you! :)
Take my words Josh you are the best teacher on the internet who teaches Statistics........ and the chain rule made me crazy.......... by your explanation.
Wow, thanks!
@@statquest ❤️
One of the best video i have ever watched. Thank yoy guys for providing such a wonderful content for free.
Thanks!
Awesome Explanation Mr. Starmer! I wish your videos existed back when I was taking Calculus in the university!!! ( which was a long time ago =) )
Wow, thanks!
This dude explains things clearly. Huge thanks!
Thanks!
Now I can't read "the chain rule" without hearing your voice !
:)
Bro your the only tutorial that actually helped me grasp this concept, thank you so much.
Glad it helped!
@@statquestI know this isn't related to this video, i just want you to help me because you replied to this comment.
With gradeint descent, how am i supposed to get the derivative for each weight and bias in a loss function dynamically? because surely for networks with more than 100 neurons there would be a way, i know there is i just don't know.
When i am calculating the derivative for one varaible in the loss function, to optimize it, i get some overly complicated function, but i see some papers on it and it isn't complicated.
@@mr.shroom4280 See: czcams.com/video/IN2XmBhILt4/video.html czcams.com/video/iyn2zdALii8/video.html and czcams.com/video/GKZoOHXGcLo/video.html
@@statquest thankyou so much, i watched those but i totally forgot about the chain rule lol
Your videos are fantastic, even without the sound effects... but the sound effects really bring them over the top.
Thank you! And thank yo so much for supporting StatQuest!!! BAM! :)
An epically clear explanation. Thank you so much!
Thank you! :)
These seriously are some of my favorite videos on youtube!
Thanks!
This one outdoes all the best videos on the topic .
Thank you!
I would like to thank you from bottom of my heart for such wonderful videos.
Such difficult topic made simple, you are awesome man , keep rocking!!!!
And Triple BAM!!!!
Thank you very much! :)
thanks for clearing up the confusions i had with chain rule!
bam!
i'm so moved to finally understand this, thank you!
bam! :)
You had made my machine learning path easy!
Glad to hear that!
Dear Josh Starmer, Thank you so much. May God bless with you more knowledge so that you can energize learners like me. ❤. Thank you again.
Thank you very much!
this is epic, simple, and applicable chain rule in real life too - we need more videos like this damn
Thank you! :)
Hey Josh
You an awesome guy with amazing explanation of the concept through simple visuals. And this is my first video of yours. I got just amazed by the way you explained so simply. I would like to learn statistics, machine learning and deep learning as well. could u suggest me the order I have to walk through your playlist to get deep dive into those concepts with strong base.
And keep up the good work. Cheers:)
I have all my videos organized by topic and, within each topic, from simple to complicated here: statquest.org/video-index/
Awesome Statquest...
Initially played Song and concept too!!😎😎😎
Thanks! :)
Teaching is an art. thank you StatQuest
Thank you!
Simply the best explanation of chain rule!
Now I understand CR better to teach my kid when she needs it...
Thank you!!!
Do you publish a book on calculus I would love to buy it!
Thanks! I don't have a book on calculus, but I have on on machine learning: statquest.org/statquest-store/
Oh boy that's a teaser for neural net. Been looking forward to this!!
YES!!! This is the first video in my series on Neural Nets!!!!!!! The next one should be out soon (hopefully late July, but I always run behind so maybe early August).
Thank you Sir for the amazing Tutorial.
Thanks!
This be the first time I am laughing learning stats🤣 Thanks alot!
Hooray! :)
Hi Josh, thank you for your awesome video as always!
Been learning with you for some time now.
I really enjoy learning thru your lens, and been curious why you call terminology dreadful :D ?
Although the first time exposure is always not easy, terminology is an anchor to me. It keeps me from getting adrift amidst the sea of confusing concepts and ideas. Sometimes teachers and tutors go so fast, so I make sure to ask them if what they are talking about has a name. So I can always read more about it at my pace when I'm lost again.
Sharing a bit of my lens. Thank you always ;-) !
I'm glad my videos are helpful and thank you for sharing your learning perspective with me.
Amazing video! Back to basics 😄👍
Thanks!
Great teaching Josh Starmer!
Thank you kindly!
Thank you so much for your videos! I got a StatQuest Shirt for my Birthday... hurray! :)
BAM! :)
LOVE YOUR CONTENT BEST FUN LEARNING EVER!!! (The chain rule is COOL)
bam!
awsome work man!!!! you have created the best content...... I wish that you should be teaching us at our college🥺
Thank you so much 😀
Such a beautiful intuition that weight height then height shoe size example was just commendable
Thanks!
hanks for all your amazing videos. I'm still learning from you :)
Thank you!
Yet another bravo tutorial video! Thank you, Josh! One question is: what visual software/tool do you use to draw those beautiful plots? Are u like 3Blue1Brown to write a JS front-end tool yourself? Thanks!
I'm glad you like the videos! I draw the pictures in Keynote.
3b1b does not use JS front end tool , It's Python animation lib powered by Cairo (C lib) or now it uses Open GL.
Awesome. You made my day!
Hooray! :)
Your explanation is awesome. Make more videos.
Thank you!
The best video in the internet about the Chain Rule!
Thank you!
Bam! You are awesome. Thanks a lot.
bam! :)
Reading abour Loss in Neural Network and optimization from 20+ sources and could not understand it until watching this video. Big BAM!
Hooray! Thank you!
Thank you!!!
bam! :)
Thanks for informative video.
Thanks!
your videos are fantastic
Glad you like them!
Amazing video thanks!
Thanks!
BAM! best explanation so far
Thank you! :)
Top notch visualization.
Thank you! :)
Thank you so much sir, for sharing great foundation through your videos and hard work. I am big fan of your videos.
You are my role model & best teacher in AI. I have been eagerly waiting for your book release since you announced the book publication.
Question 1: You told early Jan 2022 book will come, when can we expect the book?
After listening, your videos I am getting concept clear but, after few days I forget so,
Question 2: Is there anyway getting this study material (especially Neural Networks)?
I tried in study material but it is not available.
1) I hope the book is available in may. 2) It will have a chapter on neural networks (and even The Chain Rule).
Wow what a great video! Thanks a lot :)
Glad you liked it!
Genius serious sincere
I’m a mathematician and am convinced you are a born sage
Thanks!
6:52 that's not an exponential line (2^x), it's just a parabola (x^2). Anyhow, you're awesome! BAM! Just subscribed!
Thanks for catching that. :)
The best Chain Role tutorial! Do you have any for Relu? Thank you!!
Coming soon!
Thanks!
bam! :)
Спасибо, вы молодец!
bam! :)
13:15 Is the residual(squared) graph mirrored? Since residual=(observed - predicted), wouldn't that mean that when on the original graph the intercept is zero, the residual would be positive(2-1=1), so the position on the residual(squared) graph should be on the positive x-axis(x=1), as opposed to the negative side on the video, and vice versa?
Yes! You are correct. Oops!
LMAO, the song at the beginning xD, just for that I'm giving it a like.
BAM! :)
I think you must be an alien! This is the best, most simplistic and complete explanation I have seen -ever. Fantastic job you did ❤️ thanks
Thank you!
Best reference for learning statistics. Btw, would just like to point out that in 6:16, there appears to be a minor mistake. Actually for every 1 unit increase in Weight, there is a 2 unit increase in Shoe Size, because the equation would be Size = (1/2)*Weight, or 2*Size = 1*Weight
This video is actually correct. For every one unit increase in weight, there is only a 1/2 unit increase in Shoe Size. What your equation shows is that for every unit increase in Size, there is a 2 unit increase Weight. That's not the same thing as "for every unit increase in Weight, there is a 2 unit increase in Size".
@@statquest I calculated through the equation, and you are correct. Thanks for the verification!
Simply beautiful. you are the best.
Wow, thank you!
Thanks for the video!
In the last example, why not just plug in height = 2 and weight = 1 to solve for the intercept:
When residual = 0, height - ( intercept + (1*weight)) = 0, so intercept = 1?
Sure, you could solve the equation directly, but the goal is to show how the chain rule works. Furthermore, by using the chain rule, we solve for the general equation and not just a specific equation tied to this specific data.
Hi, I think I found a mistake. (?) The pink ball in the graph from 13:08 should be on the other side of the Y axis. It doesn't change the educational value of the whole video but it caught my eye.
Oh, I see someone already brought this up.
yep
So good !!!!
Thank you! :)
Amazing Video. Helps a lot! Does anyone know an example of an empirical research paper in which the chain rule (two step procedure) is applied in the context of empirical testing of the research question/hypothesis? Thank you very much for a reply!
Logistic Regression uses Gradient Descent, which, in turn, often uses the chain rule
@@statquest Dear Josh, thank you for your answer. I want to concretise my question. I understood from your videos that the chain rule is used in neural networks to solve the optimization problem and also in logistic regression using gradient descent etc.. I'm currently looking for a content example of published research (= a concret study) in which the modelling approach weight (some indepedent variable) predicts height(some other independent variable) and height predicts shoe size(dependent variable). Does anyone know an example of such an empirical research paper? Thank you very much for a reply!
How would you extend the chain-rule for square residuals lesson to more than one datum though?
ie: you are working with a summation of residuals?
You just add a term for each residual. To see this in action, see: czcams.com/video/sDv4f4s2SB8/video.html
Really....you are amazing!
Thank you so much 😀
I'm getting strong MST3K and Star Control II vibes from this guy and that's pretty cool
bam!
Never mind stats, I'm a musician, do you tune your guitar down evenly so the low string is at D, or do you just not like E minor? Because I appreciate when someone has songs in keys other than E minor.
I play a tenor guitar, tuned (from low to high): C, G, D, A (in 5ths).
Thank you!
Thanks! :)
Hi sir, really your youtube channel was good, my small suggestion or request reference very important. What basis (means which textbook based on you are telling). Please mention every time. but really your youtube channel very useful
When I have a specific reference, I cite it in the video's description. For this video, I did not have a specific reference.
A video also on probability chain rule would be awesome
Noted! :)
13:27 When the residual is negative, the pink circle is shown to be on the right side of the y-Axis, but shouldn't it be on the left side?
Aside from that, great content! Cheers from Germany
Yep. Thanks for catching that! I've added a correction to the pinned comment.
Man i'd like to use that metaphore of your's in a turkish video of chain rule explanation you're amazing
Thank you! If you're interested in creating subtitles for this video, contact me through my website: statquest.org/contact/
Thanks for these amazing videos! can you make a video on shared nearest neighbor clustering?
I'll keep that in mind.
Thank you ❤❤❤❤
Any time!
Awesome!
Thanks!
I graduated with stats degrees from college 10+ years ago and never touched it. Now I feel I re-learned everything overnight!!!!!
BAM! :)
I'm getting gradually waiting for the "BAM".....I've been addicted to it....
bam! :)
There are people who love StatQuest and there are people who don't know about StatQuest yet... poor souls
Thanks! :)
you deserve Nobel prize Nobel man
Thank you!