SVM (The Math) : Data Science Concepts

  Рет қаралды 115,726

ritvikmath

ritvikmath

Күн бұрын

Пікірлер: 208
@stanlukash33
@stanlukash33 3 жыл бұрын
This guy is underrated for real. KZbin - throw him into recommendations.
@jmspiers
@jmspiers 3 жыл бұрын
I know... I recommend him all the time on Reddit.
@backstroke0810
@backstroke0810 2 жыл бұрын
True! He deserves way more subscription. He should prepare a booklet like statquest did but of his own. Would definitely buy it!
@aravind_selvam
@aravind_selvam 2 жыл бұрын
True!!
@sejmou
@sejmou Жыл бұрын
In case you're also having trouble figuring out how we arrive at k=1/||w|| from k * (w*w/||w||) = 1: remember that the dot product of any vector with itself is equal to its squared magnitude. Then, w*w can also be expressed as ||w||^2. ||w||^2/||w|| simplifies to just ||w||. Finally bring ||w|| to the other side by dividing the whole equation by ||w||, and you're done :) if you also have trouble understanding why exactly the dot product of any vector with itself is equal to its squared magnitude it also helps to know that the magnitude of a vector is the square root of the sum of squares of its components and that sqrt(x) * sqrt(x) = x I hope that somehow makes sense if you're struggling, surely took me a while to get that lol
@FootballIsLife00
@FootballIsLife00 Жыл бұрын
I almost forget this rule, thank you brother for saving my day
@mdrashadalhasanrony8694
@mdrashadalhasanrony8694 6 ай бұрын
yes. w*w = ||w||*||w|| * cos 0 = (||w||)^2 angle is 0 degress because multiplying the same vectors
@Neuroszima
@Neuroszima Ай бұрын
You are a true hero of this episode. Grab a medal of gratitude: 🥇
@supersql8406
@supersql8406 4 жыл бұрын
This guy is super smart and he takes sophisticated concepts and explains it in a way where it's digestible without mocking the theory! What a great teacher!
@ragyakaul6027
@ragyakaul6027 3 жыл бұрын
I can't explain how grateful I am for your channel! I am doing an introductory machine learning course at Uni and it's extremely challenging as it's full of complex concepts and the basics aren't explored throughly. Many videos I came across on youtube were too overly simplified and only helped me very briefly to make sense of my course. However, your videos offer the perfect balance, you explore the complex maths and don't oversimplify it, but do so in a way that's easy to understand. I read through this concept several times before watching your video, but only now do I feel as if I TRULY understand it. I HIGHLY appreciate the work you do and look forward to supporting your channel.
@maged4087
@maged4087 2 жыл бұрын
same
@shusrutorishik8159
@shusrutorishik8159 4 жыл бұрын
This has been simultaneously the simplest, most detailed and yet most concise explanation of this topic I've come across so far. Much appreciated! I hope you keep making awesome content!
@ritvikmath
@ritvikmath 4 жыл бұрын
Glad it was helpful!
@friktogurg9242
@friktogurg9242 5 ай бұрын
@@ritvikmath Is it possible to find w and b if you are not explicitly given constraints? Is it possible to find the values of w and b without explicitly solving the optimization problem? Can both be done through geometric intuition?
@vedantpuranik8619
@vedantpuranik8619 3 жыл бұрын
This is the best and most comprehensible math video on hard margin SVM I have seen till date!
@velevki
@velevki 3 жыл бұрын
You answered all the questions I had in mind without me even asking them to you. This was an amazing walkthrough. Thank you!
@stephonhenry-rerrie3997
@stephonhenry-rerrie3997 2 жыл бұрын
I think this might be top 5 explanations of SVM mathematics all-time. Very well done
@FPrimeHD1618
@FPrimeHD1618 2 жыл бұрын
Just to add onto all the love, I'm a data scientist in marketing and you are my number one channel for reviewing concepts. You are a very talented individual!
@KARINEMOOSE
@KARINEMOOSE 3 жыл бұрын
I'm a PhD student studying data mining and I just wanted commend you for this SUPERB explanation. I can't thank you enough for the explaining this so clearly. Keep up the excellent work!!
@honeyBadger582
@honeyBadger582 4 жыл бұрын
That's what i've been waiting for! Thanks a lot. Great video!
@ritvikmath
@ritvikmath 4 жыл бұрын
Glad it was helpful!
@tollesch_tieries
@tollesch_tieries 5 ай бұрын
THE BEST EXPLANATION of SVM on KZbin! And the whole internet! THANK YOU!
@pavelrozsypal8956
@pavelrozsypal8956 3 жыл бұрын
Another great video on SVM. As a mathematician I do appreciate your succinct yet accurate exposition not playing around with irrelevant details.
@srivatsa1193
@srivatsa1193 3 жыл бұрын
This is the best and the most intuitive explanation for SVM. It is really hard for me to actually read research papers and understand what story each line of the equation is telling. But you made it soo intuitive. Thanks a ton! Please Please make more videos like this
@nickmillican22
@nickmillican22 3 жыл бұрын
Question on the notation. The image shows that the vector between the central line and decision line is w. So, I think, that w is the length of the decision boundary. But then we go on to show that the length of the decision boundary is k=1/||w||. So I'm not clear on what w (or k, for that matter) are actually representing.
@WassupCarlton
@WassupCarlton 9 ай бұрын
I too expected k to equal the length of that vector w :-/
@luchomame1
@luchomame1 Жыл бұрын
Dude thank you! now these equations don't feel like they were pulled out of thin air. and the best part is I can work them out too! I haven't done linear algebra in almost a decade so I got stuck on the ||w||/(w*w) part for a good bit but this pushed me to refresh some concepts and figure it out! Thank you
@polarbear986
@polarbear986 2 жыл бұрын
I finally get svm after watching a lot of tutorial on KZbin. Clever explanation. Thank you
@panagiotistsikos8484
@panagiotistsikos8484 17 күн бұрын
this guy is just a treasure to data science communication!!! A very big THANK YOU...
@suparnaprasad8187
@suparnaprasad8187 4 ай бұрын
The best video I've watched on SVMs! Thank you so much!!
@ritvikmath
@ritvikmath 4 ай бұрын
Wow, thank you!
@Shaan11s
@Shaan11s 10 ай бұрын
your videos are what allowed me to take a spring break vacation bro, saved me so much time thank you
@ritvikmath
@ritvikmath 10 ай бұрын
Great to hear!
@naengmyeonkulukulu
@naengmyeonkulukulu Жыл бұрын
Hi all, at 5:14, how does he get from k (W.W/|| W ||) =1 to k = 1/|| W ||? Appreciate if anyone can enlighten me
@raulfernandez9370
@raulfernandez9370 10 ай бұрын
|| W || = [W.W]^{1/2} so, square everything to get rid of the square root in the denominator and there you have it.
@usmanabbas7
@usmanabbas7 2 жыл бұрын
You and statquest are the perfect combination :) Thanks for all of your hardwork.
@techienomadiso8970
@techienomadiso8970 Жыл бұрын
This is a serious good stuff video. I have not seen a better svm explanation
@gdivadnosdivad6185
@gdivadnosdivad6185 Жыл бұрын
I love your channel. You explain difficult concepts that could be explained to my dear grandmother who never went to college. Excellent job sir! You should become a professor one day. You would be good.
@chimetone
@chimetone 10 ай бұрын
Best high-level explanation of SVMs out there, huge thanks
@ritvikmath
@ritvikmath 10 ай бұрын
Glad it was helpful!
@TheWhyNotSeries
@TheWhyNotSeries 4 жыл бұрын
At 5:10, I don't get how you obtain K from the last simplification. Can you/someone please explain? Btw beautiful video!
@ritvikmath
@ritvikmath 4 жыл бұрын
thanks! I did indeed kind of skip a step. The missing step is that the dot product of a vector with itself is the square of the magnitude of the vector. ie. w · w = ||w||^2
@TheWhyNotSeries
@TheWhyNotSeries 4 жыл бұрын
@@ritvikmath right, thank you!!
@yangwang9688
@yangwang9688 4 жыл бұрын
Very easy to follow the concept! Thanks for this wonderful video! Looking forward to seeing next video!
@lisaxu1848
@lisaxu1848 2 жыл бұрын
studying my masters in data science and this is a brilliant easy to understand explanation tying graphical and mathematical concepts - thank you!
@zz-9463
@zz-9463 4 жыл бұрын
very informative and helpful video to help understand the SVM! Thanks for such a great video! You deserve more subscribers
@clifftondouangdara6249
@clifftondouangdara6249 2 жыл бұрын
Thank you so much for this video! I am learning about SVM now and your tutorial perfectly breaks it down for me!
@maheshsonawane8737
@maheshsonawane8737 Жыл бұрын
🌟Magnificient🌟I actually understood this loss function in by watching once. Very nice explanation of math. I saw lot of other lectures but you cant understand math without graphical visualization.
@mindyquan3141
@mindyquan3141 2 жыл бұрын
So simple, so clear!!! Wish all the teachers are like this!
@AkashRoy-do2dg
@AkashRoy-do2dg 3 ай бұрын
This is truly great study material . thank you very much for putting this much effort.
@ritvikmath
@ritvikmath 3 ай бұрын
Glad you enjoy it!
@lakhanpal1987
@lakhanpal1987 2 жыл бұрын
Great video on SVM. Simple to understand.
@acidaly
@acidaly 2 жыл бұрын
Equation for points on margins are: w.x - b = 1 w.x - b = -1 That means we have fixed our margin to "2" (from -1 to +1). But our problem is to maximize the margin, so shouldn't we keep it a variable? like: w.x - b = +r w.x - b = -r where maximizing r is our goal?
@davud7525
@davud7525 Жыл бұрын
Have you figured it out?
@prathamghavri
@prathamghavri 10 ай бұрын
Thanks man great explaination , was trying to understand the math for 2 days , finally got it
@ritvikmath
@ritvikmath 10 ай бұрын
Glad it helped!
@Nofaltuguy1
@Nofaltuguy1 Ай бұрын
best best bestttttest explaination i can ever imagined
@nikkatalnikov
@nikkatalnikov 4 жыл бұрын
Great video as usual! A possible side note - I find 3d picture even more intuitive. Adding z-direction which is basically can be shrunk to [-1;1] is our class prediction dimension and x1 x2 are feature dimensions. Hence, the margin hyperplane "sits" exactly on (x1; x1; 0) This is also helpful for further explanation of what SVM kernels are and why kernel alters the norms (e.g. distances) between data points, but not the data points themselves.
@A.K_1998
@A.K_1998 16 күн бұрын
very good understandable in details explanation for SVM Math. Thank you very much!
@houyao2147
@houyao2147 4 жыл бұрын
It's so easy to understand thi s math stuff! Best explanation ever in such a short video.
@borisshpilyuck3560
@borisshpilyuck3560 8 ай бұрын
Great video ! Why we can assume that right hand side of wx - b in those three lines is 1, 0, -1 ?
@BlueDopamine
@BlueDopamine 2 жыл бұрын
I am very happy that I found Your YT Channel Awsome Videos I was unable to Understand SVM UntilNow !!!!
@salzshady8794
@salzshady8794 4 жыл бұрын
Could you do the math behind each Machine learning algorithm, also would you be doing Neural Networks in the future?
@marthalanaveen
@marthalanaveen 4 жыл бұрын
along with the assumptions of supervised and un-supervised ML algorithms that deals specifically with structured data.
@ritvikmath
@ritvikmath 3 жыл бұрын
Yup neural nets are coming up
@jjabrahamzjjabrhamaz1568
@jjabrahamzjjabrhamaz1568 3 жыл бұрын
@@ritvikmath CNN's and Super Resolution PLEASE PLEASE PLEASE
@germinchan
@germinchan 2 жыл бұрын
This is very clearly defined. Thank you. But could someone explain to me what w is? How can I visualize it and calculate it.
@more-uv4nl
@more-uv4nl 9 ай бұрын
this guy explained what my professors couldn't explain in 2 hours 😂😂😂
@joyc5784
@joyc5784 2 жыл бұрын
On the other references they use the plus (+) sign on w x - b = 0. Why on your example this was changed to minus sign? w x - b = 0. or wx - b > 1. Hope you could answer. Thanks
@aashishkolhar8155
@aashishkolhar8155 3 жыл бұрын
Great, thanks for this lucid explanation about the math behind SVM
@rndtnt
@rndtnt 2 жыл бұрын
Hi, how exactly did you choose 1 and -1, the values for wx -b where x is a support vector? wx-b = 0 for x on the separating line makes sense however. Could it have other values?
@khanhvynguyen7858
@khanhvynguyen7858 3 ай бұрын
YOU ARE MY SAVIORRR. GOD BLESS YOU!!!
@kmishy
@kmishy 2 жыл бұрын
How you chose equation of two blue parallel lines? I mean how did you get 1 in the upper line and -1 for bottom line?
@jaisheel008
@jaisheel008 4 жыл бұрын
How do I choose the values for w vector and b ??
@andreykol13
@andreykol13 4 жыл бұрын
you might want to search 'lagrange multipliers' for solving this problem and maybe this will also help: web.mit.edu/6.034/wwwbob/svm-notes-long-08.pdf
@jaisheel008
@jaisheel008 4 жыл бұрын
Thanks for your inputs Andrey !!
@pedrocolangelo5844
@pedrocolangelo5844 Жыл бұрын
Once again, ritvikmath being a lifesaver for me. If I understand the underlying math behind this concepts, it is because of him
@jaibhambra
@jaibhambra 3 жыл бұрын
Absolutely amazing channel! You're a great teacher
@jingzhouzhao8609
@jingzhouzhao8609 8 ай бұрын
thank you for your genius explanation. At 5:11, before getting the value k, the equation k * ( w * w) / (magnitude of w) = 1 contains w * w, why the output k doesn't have w in the end.
@nishanttailor4786
@nishanttailor4786 2 жыл бұрын
Just Amazing Clarity of Topics!!
@amanbagrecha
@amanbagrecha 4 жыл бұрын
what about the points within the margin? are they support vectors as well?
@ht2239
@ht2239 4 жыл бұрын
You explained this topic really well and helped me a lot! Great work!
@fengjeremy7878
@fengjeremy7878 2 жыл бұрын
Hi ritvik! I wonder what is the geometric intuition of the vector w? We want to minimize ||w||, but what does w look like on the graph?
@akwagaiusakwajunior2903
@akwagaiusakwajunior2903 2 жыл бұрын
How will the algorithm classify if an arbitrary observation lies within the hyperplane
@shohoku100
@shohoku100 4 жыл бұрын
7:50 do you mean product of -1 is lesser or equal to -1?
@MetinGunes-ix6yf
@MetinGunes-ix6yf 11 ай бұрын
Nope, it's also bigger or equal to 1 as with the other situation. Because If Yi is a negative one, w.xi - b is lesser or equal to 1. But if you multiply the vector Yi with this equality, it will be bigger or equal to one. The negative will vanish due to multiplication. Then, in terms of multiplication yi and w,xi b, we will get only one equation which is '' yi. ( w.xi - b) '' is bigger or equal to one. I hope it's clear.
@badermuteb4552
@badermuteb4552 4 жыл бұрын
Thank you so much. This is what i have been looking for so long time. would you please do the behind other ML and DL algorithms.
@antoniogonzalez8753
@antoniogonzalez8753 5 ай бұрын
How would you address outliers mathematically?
@arthurus77
@arthurus77 2 жыл бұрын
why it's -b and not just + b ?
@thomaslevine8563
@thomaslevine8563 4 ай бұрын
Great video! Question: I've seen other resources/videos online that use this equation: w * x + b = 0 for the classifier. Is there a particular reason why it's w * x - b = 0 here? is there any mathematical difference?
@ShakrinJahanMozumder
@ShakrinJahanMozumder 4 ай бұрын
Great Work! Just one confusion; why minus b? Your response would be highly appreciated!
@himanshu1056
@himanshu1056 3 жыл бұрын
Best video on large margin classifiers 👍
@WassupCarlton
@WassupCarlton 9 ай бұрын
This is giving "Jacked Kal Penn clearly explains spicy math" and | am HERE for it
@dcodsp_
@dcodsp_ Жыл бұрын
Thanks for such brilliant explanation really appreciate your work!!
@emid6811
@emid6811 3 жыл бұрын
Such a clear explanation! Thank you!!!
@asharnk
@asharnk Жыл бұрын
What an amazing video bro. Keep going.
@fengjeremy7878
@fengjeremy7878 3 жыл бұрын
Thank you! I am wodering why do we use "+1 and -1" instead of "+1 and 0" to classify these two areas?
@sukritgarg3175
@sukritgarg3175 9 ай бұрын
Holy shit what a banger of a video this is
@Jayanth_mohan
@Jayanth_mohan 3 жыл бұрын
This really helped me learn the math of svm thanks !!
@ananya___1625
@ananya___1625 2 жыл бұрын
Awesome explanation I've a doubt, (might be silly) How did people come up with W.X-b=1 and W.X-b=-1?does 1, -1 in these equations tell us something? For some reason, I'm unable to get the intuition of 1,-1 in the above equations.(although i understood that they are parallel lines) Someone pls help me
@pauledam2174
@pauledam2174 Жыл бұрын
I have the same question.
@mohamedahmedfathy84
@mohamedahmedfathy84 5 ай бұрын
maybe an assumption so we say that the margin is the magnitude of w so easily interpreted? i dont know really
@mensahjacob3453
@mensahjacob3453 3 жыл бұрын
Thank you Sir . You really simplified the concept. I have subscribed already waiting patiently for more videos 😊
@maged4087
@maged4087 2 жыл бұрын
does b affect finding the slope?
@conorheins8880
@conorheins8880 4 жыл бұрын
Just FYI the link for the video about the intuition behind SVM isn't in the description.
@ritvikmath
@ritvikmath 4 жыл бұрын
thanks for the heads up! just added it.
@sorrefly
@sorrefly 3 жыл бұрын
I'm not sure but I think you forgot to say that in order to have margin = +-1 you should scale multiplying constants to w and b. Otherwise I don't explain how we could have distance of 1 from the middle The rest of the video is awesome, thank you very much :)
@fatriantobong
@fatriantobong 10 ай бұрын
maybe the question is, what algorithm svm uses to look for the weight or coefficients of hyperplane?
@SreehariNarasipur
@SreehariNarasipur 2 жыл бұрын
Excellent explanation Ritvik
@lemongrass3628
@lemongrass3628 Жыл бұрын
You are an amazing elucidator👍
@akashnayak6144
@akashnayak6144 2 жыл бұрын
Loved it!
@TheCsePower
@TheCsePower 2 жыл бұрын
You should mention that your W is an arbitrary direction vector of the hyperplane. (it is not the same size as the margin)
@amairaa11
@amairaa11 3 ай бұрын
I AM SO THANKFUL!!
@ifyifemanima3972
@ifyifemanima3972 2 жыл бұрын
Thank you for this video. Thanks for simplifying SVM.
@muhtasirimran
@muhtasirimran 2 жыл бұрын
I would be thankful if you tell me what maths are required for SVM and any reference to learn that. I have searched on internet for a looooooong time and every single one says just the basic math. I'm too frustrated over the internet rn.
@akshaypai2096
@akshaypai2096 4 жыл бұрын
Can you please do videos on normal to a plane, distance of a point from a plane and other basic aspects of linear algebra... Big fan and an early subscriber🙏🏻keep growing!
@ritvikmath
@ritvikmath 4 жыл бұрын
That's a good idea; I've been thinking of next videos and these linear algebra basics would be likely helpful in understanding the eventually more difficult concepts. Thanks for the input!
@akshaypai2096
@akshaypai2096 4 жыл бұрын
@@ritvikmath I'm a big fan of your content since I saw your videos on time series AR and MAs....now I'm going through the math behind ML, but given I have a business degree at my undergrad I don't have the intuition behind lot of very basic stuff hence your video series on those would be great help for people like me👍🏻Always happy to help
@pradeepsvs
@pradeepsvs Жыл бұрын
@ritvikmath, why is the intercept (b) is negative? The equation of the line/plane/hyperplane should be w1x1 + w2x2 + w3x3 + b = 0, i.e. wx+b = 0 should the line equation. isn't?
@ketankumar5689
@ketankumar5689 Жыл бұрын
did you able to understand it ? I am still confused for that negative b.
@wildbear7877
@wildbear7877 Жыл бұрын
You explained this topic perfectly! Amazing!
@ritvikmath
@ritvikmath Жыл бұрын
Glad you think so!
@suvikarhu4627
@suvikarhu4627 2 жыл бұрын
I am struggling to understand what is w? Why not margin size=2*||w||?
@kanishksoman7830
@kanishksoman7830 Жыл бұрын
Hi Ritvik, you are a great teacher of stats, calculus and ML/DL! I have one question regarding the equations. Why is the decision boundary equation W.X - b = 0? Shouldn't it be W.X + b = 0. I know the derivations and procedure to find the maximal margin is not affected but I don't understand -b. Please let me know if the sign is inconsequential. If it is, why is it? Thanks!
@yashshah4172
@yashshah4172 4 жыл бұрын
Hey Ritvik, Nice video, can you please cover the kernalization part too.
@madshyom6257
@madshyom6257 2 жыл бұрын
Bro, you're a superhero
@mykhailoseniutovych6099
@mykhailoseniutovych6099 8 ай бұрын
Great video, with easy to follow explanation. However, you formulated the optimization problem that needs to be solved by the end of thevideo. The most ineteresting question now is how to actually solve this optimization problem. Can you give some directions on how this problem is actually solved?
@Snaqex
@Snaqex Жыл бұрын
Youre so unbelieveble good in explaining :)
@AchrafMessaoudi-d3o
@AchrafMessaoudi-d3o Жыл бұрын
you are my savior
@godse54
@godse54 3 жыл бұрын
Pls also make one for svm regression.. you are amazing
@subhojitchatterjee6312
@subhojitchatterjee6312 3 жыл бұрын
Cant the intercept be positive? Why are we using -b?
@shubhamguptamusic
@shubhamguptamusic 4 жыл бұрын
woww what an explanation..........great
@ritvikmath
@ritvikmath 4 жыл бұрын
Glad you liked it
@maurosobreira8695
@maurosobreira8695 3 жыл бұрын
Amazing teaching skills - Thanks, a lot!
Metropolis - Hastings : Data Science Concepts
18:15
ritvikmath
Рет қаралды 113 М.
Soft Margin SVM : Data Science Concepts
12:29
ritvikmath
Рет қаралды 55 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Support Vector Machines : Data Science Concepts
8:07
ritvikmath
Рет қаралды 76 М.
The Kernel Trick - THE MATH YOU SHOULD KNOW!
7:30
CodeEmporium
Рет қаралды 182 М.
Math for AI and ML: This strategy makes learning so much easy!
11:20
Support Vector Machines (SVM) - the basics | simply explained
28:44
sqrt(i)
9:02
blackpenredpen
Рет қаралды 4,7 МЛН
Principal Component Analysis (The Math) : Data Science Concepts
13:59
Support Vector Machines: All you need to know!
14:58
Intuitive Machine Learning
Рет қаралды 172 М.
what is i factorial?
7:56
blackpenredpen
Рет қаралды 315 М.
one year of studying (it was a mistake)
12:51
Jeffrey Codes
Рет қаралды 215 М.