If you found any value from the video, hit the red subscribe and like button 👍. I would really love your support! 🤗🤗 👉 You will get a New Video on Machine Learning, every Sunday, if you subscribe to my channel, here : th-cam.com/channels/JFAF6IsaMkzHBDdfriY-yQ.html
Dividing the cost function by 2 is not for finding the average. It is just for convenience when the squared function is differentiated, the nominator gets a 2 for multiplication factor. So to eliminate this we just put a 2 in the denominator, I suppose.
The lesson from my professor(formula without demonstraton) make me sleepy all the time, but u make it look very simple problem and understandable. Thank you!
That's great as I took a premium course from google.... I came here for revision, as I wonder if you could explain it in simpler terms.... Great explanation 👍
WOW! Thank you for this.. I had been trying to look everywhere which simplifies the explanation of Mean Squared Error and what its purpose into few minutes and you did superb! Just in time for my research.
The 2 exponent is there to eliminate negative numbers and not because of the magnitude of the data points. If anything squaring would make them even larger.
Yes right . Making them larger won’t be a problem, because the graph of cost vs weight will remain the same way, and we will be able to reach to the local minima of that graph. You can try once by taking absolute value without squaring, and then try again with taking square, you will get the same accuracy and results in both cases.
Hi Murali, you either need to square the cost function or take modulus of it. What we want is positive number for the difference between actual value and predicting value. Otherwise we will not be able know how large is our error. For eg, if our error differences are 3, -4, 2. Then cost should be = (3 + 4 + 2 )/3 = 3. If we don’t square or take modulus of these errors then it will mislead us giving the cost function value to be = (3 - 4 + 2 )/3 = 0.33
@@MachineLearningWithJay thanks a lot for your quick reply. I really understood it in now in very good manner. I really appreciate your effort for teaching others.
cost function can be any function for those who are asking why dividing by 2 . of course the ones that makes sense and we can minimize is a function power of 2 so that's why
I learned ML first from him only... and really liked his teaching. Yea... and that is why my teaching style has been adapted to his. Good to know that you found my video helpful.
Cool video thank U ...when you try to tune for example the PI control Gains (kp, ki) of a closed loop sys by " genetic algorithm " the cost is the same as fitness function ...and if want to suggest to me any thing can help to code this in matlab. Thanks again for the effort
Hello Maliha, thanks for your question. As we are taking the sum of squared errors of all m datapoints, dividing it with (1/m) will give us the average. Thus we multiply (1/m) to get the average of squared error. You can choose to multiple (1/2m) or (1/m), it wont affect our model. But multiplying (1/2m) makes the expression mathematically simple when we are dealing with squared error. Hope it helps! Let me know.
my qn is why the square is taken? modulas was okay but why sq? next, I'm not getting why again 1/2m is needed, 1/m is okay for average but again the 1/2??
(Y - y_hat) can be negative (when our straight line is above a point), so it will lead to wrong answer if we just sum it. So if you don’t want to square it, then take its modulus i.e, | Y - y_hat | . And about the 2m, i have already answered that in the comment down below. Do check that out.
Good job. Just please stop trying to force an american accent. Doesn't matter what accent you have, you are intelligent enough to explain tought concepts to everyone. Just be you
If you found any value from the video, hit the red subscribe and like button 👍. I would really love your support! 🤗🤗
👉 You will get a New Video on Machine Learning, every Sunday, if you subscribe to my channel, here : th-cam.com/channels/JFAF6IsaMkzHBDdfriY-yQ.html
This is my first time accessing such a video and it is a clear way of description, thank you!
Thank you for the appreciation. Glad it helped! 🙂
Dividing the cost function by 2 is not for finding the average. It is just for convenience when the squared function is differentiated, the nominator gets a 2 for multiplication factor. So to eliminate this we just put a 2 in the denominator, I suppose.
Actually,i m seeing for this in comment's section .thanks :)
@@hjlruk x2
The lesson from my professor(formula without demonstraton) make me sleepy all the time, but u make it look very simple problem and understandable. Thank you!
Glad I could help 😄
That's great as I took a premium course from google.... I came here for revision, as I wonder if you could explain it in simpler terms.... Great explanation 👍
Thank you so much!
You got a new sub man, i didn't know this can be this simple, i really appreciate it.
Thank you 😇
You are a GEM. explaining in simple words with drawing.
WOW! Thank you for this.. I had been trying to look everywhere which simplifies the explanation of Mean Squared Error and what its purpose into few minutes and you did superb! Just in time for my research.
Glad I could help!
Explained in such easy to understand language, this was my first video tutorial and I understood it pretty well.
Thank you.
I am very glad to be able to help you! Your comment really means alot to me.. Thanks alot !!
Thanks for explaining in the best possible and easy way. I was finding this very hard but after watching this video I understood it
Thanks ! I am happy that you found value from the video !
Than you! Very clear explanation, never imagined this would be such easy to understand.
Your welcome!
I love it. Greetings from Germany!
Thank You so much! I am really glad you liked it !
The 2 exponent is there to eliminate negative numbers and not because of the magnitude of the data points. If anything squaring would make them even larger.
Yes right . Making them larger won’t be a problem, because the graph of cost vs weight will remain the same way, and we will be able to reach to the local minima of that graph.
You can try once by taking absolute value without squaring, and then try again with taking square, you will get the same accuracy and results in both cases.
Easy to understand this video. Thanks, coding lane.
You’re welcome!
jz luv the way u gave the intro ..... it's quite easy to learn from ur videos
Thank You so much Jeevapriya ! This really means to me !
best explanation on cost function. Thank you for making it so simple!
You’re welcome
really good explanation! thanks very much. greetings from brazil
Hi Mauricio Jean... Good to see you. Thanks for the compliment.
Brief... Explanatory... Great....
Thanks a lot Hemant ! Really appreciate it !
This was such a great explanation! thank you !!!!
Thank you man! Keep it up 💪
Sure 🤗
Hello, JP. You explained it really very well. Thank a lot.
Just have a query... why do we apply square for our cost function. is it really necessary?
Hi Murali, you either need to square the cost function or take modulus of it.
What we want is positive number for the difference between actual value and predicting value.
Otherwise we will not be able know how large is our error.
For eg, if our error differences are 3, -4, 2. Then cost should be = (3 + 4 + 2 )/3 = 3.
If we don’t square or take modulus of these errors then it will mislead us giving the cost function value to be = (3 - 4 + 2 )/3 = 0.33
@@MachineLearningWithJay thanks a lot for your quick reply. I really understood it in now in very good manner.
I really appreciate your effort for teaching others.
You sir should be a professor
I am just a student for now . Thank You so much ! It really means a lot to me ! I am glad my videos helped you.
That is a very much good explanation. thanks for your this help
You’re welcome!
cost function can be any function for those who are asking why dividing by 2 . of course the ones that makes sense and we can minimize is a function power of 2 so that's why
nice explanation about the cost funtion bro understood the concept
Thanks alot Shajan! This means much to me. Glad to help !
Thanks man, very good job !
Welcome!
Excellently explained, thanks!
Thank You... I appreciate your comment!
Great math explanation!
Thanks a lot!
Thank you for this excelent class!
Your Welcome Daniel !
Thanks man , that was an excellent explanation^^, keep rocking \m/
Glad it helped!
Very well explained. U are amazing 😊
Thank You so much! It's my pleasure to create content
Thank You so much! It's my pleasure to create content
This really helped thanks!
Your Welcome!
Really well explained! Thanks!
Thank You Stephen ! My Pleasure 😇 !!
Very clear explanation. Thank you for the video!
Your welcome
Nice explanation dude
Thank you! 🙂
GOod explanation. Thanks!
Thank you !
thanks bro explanation is superb
Your welcome!
Thanks brother❤
@@mhrmidbencher you’re welcome
Woow nice explanation 👏👌
Thank you
This was awesome thank you so much
Glad to help!
great tutorial !
Thanks alot Jason !! Glad to help !!
thank you this was perfect
Your Welcome!
Are you from india.. your english accent is good..
And btw video is nice..
Thank You so much! Yes, I am from India
Are u student of prof. Andrew Ng? Your teaching style is very much similar to him. Anyway thank you for a great video.
I learned ML first from him only... and really liked his teaching. Yea... and that is why my teaching style has been adapted to his. Good to know that you found my video helpful.
Great explanation, but didn't get the point of multiplying with 1/2m in case of squared or 1/m in case of absolute. Thank You
I have explained that in comments section below… you can have a look at it… it might help
Cool video thank U ...when you try to tune for example the PI control Gains (kp, ki) of a closed loop sys by " genetic algorithm " the cost is the same as fitness function ...and if want to suggest to me any thing can help to code this in matlab. Thanks again for the effort
great video, thanks
good explanation
Thank you!
In this example you initiated randomly a curve. But in fact, how can we initiate the first equation/curve/line?
Thanks bro 😜👍
Thank you so much ! Your comments mean something to me.
thanks soo so much mate.
Your Welcome !
Hi, great lecture. Besides your lectures, which book or online course would you recommend to learn ML topics (KNN/SVM etc.) in depth?
did you find a book like that?
Can someone please explain why did we multiply by 1/2m?
Hello Maliha, thanks for your question.
As we are taking the sum of squared errors of all m datapoints, dividing it with (1/m) will give us the average. Thus we multiply (1/m) to get the average of squared error.
You can choose to multiple (1/2m) or (1/m), it wont affect our model.
But multiplying (1/2m) makes the expression mathematically simple when we are dealing with squared error.
Hope it helps! Let me know.
@@MachineLearningWithJay Thank you for the response! I finally get it
@@MachineLearningWithJay worse language i have ever seen. Bro she asked 2/m. i already know why we multiply with 1/m but why 2? WHY 2 TWO
my qn is why the square is taken? modulas was okay but why sq? next, I'm not getting why again 1/2m is needed, 1/m is okay for average but again the 1/2??
Hi Supriya... good question... the answer of this is already given in comments below.
what of entropy?
thank you so much dudee
He is just great
cool video!!
Thanks Akshay !
I honestly don't get why you squared it, and divided it by 2m. What's the problem in just considering the summation of all distances?
(Y - y_hat) can be negative (when our straight line is above a point), so it will lead to wrong answer if we just sum it. So if you don’t want to square it, then take its modulus i.e, | Y - y_hat | .
And about the 2m, i have already answered that in the comment down below. Do check that out.
@@MachineLearningWithJay Thanks for the response 😀
excellent
Thank you !
Thanks man
Your Welcome
you explained better than Andrew ng honestly
Thank you so much ! This really means a lot to me.
why 2m specifically? There are differences of 2m points, but there are only m values.
Excellent
Thank you so much
Thanks mate
Your Welcome!
Good job. Just please stop trying to force an american accent. Doesn't matter what accent you have, you are intelligent enough to explain tought concepts to everyone. Just be you
Thank you so much ! And I am not trying to force my accent, its now natural to me 😅. I am glab that you found my videos helpful.
He is not trying,actually i enjoed his videos though I don’t like to hear indian accent-@the channel onwer u did great
Thank you
Welcome!
Thank you.
Your Welcome Farhan !
thank you :)
You're welcome!
Why you devide by 2
I have answered this in the comments below
I think that theres an error i your cost formula, isnt (y-y^) its (y^-y).
Actually in the implementation withh Python you use this (y^-y)
Hi Francisco, it’s appropriate.
@@MachineLearningWithJay Please upload more videos with other models...
Are very helpfull
thankyou!!
why divide by 2M?
Great explanation brother
Thank You Ankit !
ty
Welcome 😇
It should be y predicted - y actual
Your hands are pretty 😂
Haha… thanks! Its the most unique compliment I have received 😁
Thanks
I think the formula of cost function in this video isn't right
Hi Aaftab, it is correct. There can different cost function formulas, depending on the type of model you are creating.
go ahead
Thanks alot Ijaj. This means alot to me !!
nice
what is the catch behind fake accent.
Its now kind of natural to me 😅. But i will improve to have more of an Indian accent
👍👍👍👍👍👍👍
Thanks 😇 !!
💯
Thank you!
Zesty