S
S
sirQaziop2013-03-20 08:00:54
Mathematics
sirQaziop, 2013-03-20 08:00:54

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

2 answer(s)
M
megalol, 2013-03-20
@sirQaziop

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.

Z
Zoberg, 2013-03-20
@Zoberg

Multivariate polynomial regression

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question