Re:The Truth About Linear Regression (2015)
by phrotoma on Wednesday July 31, 2024 @07:46AM
(#41118318)
I have very little math knowledge and point 2 surprises me. Some quick googling suggests that a linear model should produce a straight line when graphed but the example equation you offered isn't straight. I'm missing something basic aren't I?
[ Parent
| on HN ]
Re:The Truth About Linear Regression (2015)
by Tomte on Wednesday July 31, 2024 @08:12AM
(#41118532)
When statisticians talk about linear models, they talk about the parameters being linear, not your variables x_0..x_n. So y = a*sin(x) + b is a linear model, because y is linear in a and b.
Re:The Truth About Linear Regression (2015)
by gpderetta on Wednesday July 31, 2024 @08:05AM
(#41118460)
IANAS, but the example is not linear in x. But you can pick one or more axes where it would be linear. In this case for y=a*sin(x)+bx^2, you set x'=sin(x) and x"=x^2 and plot y=ax'+ bx". You can also pick an arbitrary function for y and do a similar transformation.
Re:The Truth About Linear Regression (2015)
by hervature on Wednesday July 31, 2024 @09:49AM
(#41119152)
The thing being learned here are (a,b) and you do that using data (x,y). We can rewrite our input to be of the form z = {sin(x), x^2} and then now we have the model y = a z_1 + b z_2 which is now obviously linear in z. Since x is given to us and z is just a function of x, nothing strange is happening here. Just manipulating the data.