Answer the question
In order to leave comments, you need to log in
Multivariate approximation by polynomials?
Tell me where to find a method for multidimensional (two-dimensional) approximation by polynomials.
Task: there is a matrix of measurements obtained from two independent variables x and y - in fact, sets of points z (x, y).
It is necessary to restore a function of the form: z(x,y) = a22*x^2*y^2 + a21*x^2*y + a12*x*y^2 +… + a00, where a21, for example, is the coefficient for x degree 2 and y degree 1. The values of the vectors x and y are given, all points z(x,y) are known. Find the matrix of coefficients a, where the maximum degree of polynomials in x and y can be specified (from 0 to 5).
I could not find any description of the approximation method for the multidimensional case (or at least the two-dimensional one). I know that the problem can be solved by the least squares method, but I also did not find its generalization for the multidimensional case.
If someone, in addition to the link to the description of the method, throws the code in C ++ / C #, I will be grateful).
Answer the question
In order to leave comments, you need to log in
There is no particular difference between one-dimensional and multidimensional linear LSM, if in one-dimensional LSM matrix A
1 x1 x1^2 x1^3…
1 x2 x2^2 x2^3…
1 x3 x3^2 x3^3…
…
then in multidimensional matrix , which one is needed:
1 x1*y1 x1*y1^2…
1 x2*y2 x2*y2^2…
1 x3*y3 x3*y3^2…
1 x4*y4 x4*y4^2…
…
And then the standard coefs = inv(A^T * A) * A^T * vector_z.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question