If I have a set of points $(x_i, f(x_i)) \in \mathbb{R^2} $ and I want to use the method of the the least square fitting to calculate the free parameters $a$ and $b$ of the function $$ g(x) = a - x + bx^2 $$
By looking for the function $g$, one possible basis of function would be: $$ \phi_1(x) = 1, \phi_2(x) = x^2 $$ And the missing function of $g$ would cause a translation of the linear space of the solutions. Is this correct?
I don't know to proceed with this exercise. Could anyone give me a hint? Thanks in advance.
$$h(x)=g(x)+x$$ First fit the function $h(x)$ for $a,b$ : $$h(x)=a+bx^2$$ The LINEAR Least Mean Square Regression leads to approximate $a$ and $b$ : $$\left(\begin{matrix} a \\ b \end{matrix}\right) \simeq \left(\begin{matrix} n & \sum_{i=1} ^{i=n} x_i^2 \\ \sum_{i=1} ^{i=n} x_i^2 & \sum_{i=1} ^{i=n} x_i^4 \end{matrix}\right)^{-1} \left(\begin{matrix} \sum_{i=1} ^{i=n} h_i \\ \sum_{i=1} ^{i=n} h_ix_i^2 \end{matrix}\right)\quad \text{with}\quad h_i=f_i(x_i)+x_i$$