It should be, but the fact that the xs and not the parameters is squared confuses me.
-
$\begingroup$ why not just use linear regression to fit the parabolic data? ie Y ~ X + X^2 $\endgroup$– bdeonovicMay 6, 2022 at 20:12
-
$\begingroup$ A detailed answer to your changed question appears at stats.stackexchange.com/a/354256/919. $\endgroup$– whuber ♦May 7, 2022 at 13:35
1 Answer
A parabola can be directly seen as a linear model. You do not need any activation function. Let a general parabola equation
$$y=ax^2+bx+c$$
If you use the features $x$ and $x^2$ then $y$ is linear with respect to $a,b,c$ and you can simply run a linear regression that will estimates $a,b,c$.
It can be surprising to see that a parabola is linear in some sense, but the trick is that the word "linear" in linear regression means linear with respect to the coefficients (here $a,b,c$) not the feature (here $x$).
-
$\begingroup$ Thank you! In fact, I don't understand the concept. If the linear regression is linear with respect to the parameters, what is the difference between y=beta0+betax1^2+betax2 and beta0+beta1*x1+beta2^2*x2? I mean, what is the difference between a function with parameters squared and features squared? $\endgroup$ May 7, 2022 at 8:45
-
$\begingroup$ Maybe you should look at how a (multiple) linear regression model is defined. The features are your observations/data and the parameters are what are actually estimated. The model assumes that the predicted value $y$ can be written (on average, conditionally to the data) as a linear combination of features, and the coefficients of the linear combination are the $\beta_i$. Maybe this link can be useful too : en.wikipedia.org/wiki/Polynomial_regression $\endgroup$– LelouchMay 7, 2022 at 12:37