@shirishlm The constants of regression model a0 and a1 are not constants when we write the formula for Sr. We want to make Sr as small as possible and the only "variables" we can change to do that are a0 and a1. Hence, the derivatives w.r.t. a0 and a1 put equal to zero. Once we find a0 and a1, they are constants that make Sr as small as possible - minimize Sr. As an analogy, if one is trying to minimize x^2-4, d/dx(x^2-4)=0 gives x=0. Now surely x=0 is a value that is a constant.
Thank you very much, it is gonna be very useful on my upcoming exam!
pinare111 1 month ago
How can you differentiate with respect to a0 and a1 if they are constants?I would appreciate if you could explain that part.
shirishlm 1 year ago
@shirishlm The constants of regression model a0 and a1 are not constants when we write the formula for Sr. We want to make Sr as small as possible and the only "variables" we can change to do that are a0 and a1. Hence, the derivatives w.r.t. a0 and a1 put equal to zero. Once we find a0 and a1, they are constants that make Sr as small as possible - minimize Sr. As an analogy, if one is trying to minimize x^2-4, d/dx(x^2-4)=0 gives x=0. Now surely x=0 is a value that is a constant.
numericalmethodsguy 1 year ago
Although I know most math which printed on the white board. Still, I feel pressure and kind of fuzzy.
exkillerd 1 year ago
You can see some matlab examples at
numericalmethods(dot)eng(dot)usf(dot)edu
>Keyword>Linear Regression
numericalmethodsguy 2 years ago
Where can I find examples of this being applied in matlab? I want to work out a problem. Please!
jorgealbertor 2 years ago
@jorgealbertor
well ... it's been two years, but if you're still interested, send me a message, i'll tell you how to use the MATLAB built in tools.
regards
Mehdi
mehdigoudarzi 4 months ago