Open pmar opened 11 years ago
Seems like that most of the fitting/eval methods of PolyUtils class are affected by this, although I tested and experienced this only in 2D fitting/eval.
Most likely this inconsistency is because how the A matrix in fitting (estimation) step(s) is designed, and how the coefficients are looped through in the evaluation method(s).
For live code example see: https://github.com/ppolabs/jlinda/commit/a407316a5a598e3ffbd4a0c6cda2525286a651ca
Description
There is (very annoying!) inconsistency between methods for fitting and evaluation of polynomials, in PolyUtils class.
For the correct estimation, and evaluation of polynomial, x, and y variables have to be reversed, either in fitting or evaluation of the polynomial. (See example).
Example of problem
If I fit polynomial using for example this call:
to correctly evaluate it for some point (x1,x2), I have to call: