so F is uniquely determined by the vector f=(f1,f2,…,fp).
The output of F will always be a linear combination
of the coefficients of the input vector,
(all vectors are treated as column vectors).
That was F, but what about F(xi)≈yi?
It means that we would like each ∣yi−F(xi)∣ to be as small as possible.
To be more precise, we wish to solve the following optimization problem:
and some norm∥⋅∥ to measure the magnitude of the error.
Any norm will do, but the most common choice is the
also called the 2-norm, ∥(u1,…,un)∥2=u12+…+un2.
This norm has the advantage that the solution can be computed exactly and in
a fairly efficient way (see, e.g., Section 5.5 in
A solution to this optimization problem is also computed by the NumPy function
See the following post for some examples
of how to apply linear regression to some problems.
Commenting is not possible for this post, but feel free to leave a question,
correction or any comment by using the contact page