In trying to fit polynomials to data, I have a tall and skinny matrix $A$, of size $\simeq 250,000 \times 1000$, that is quite ill-conditioned $\kappa(A) \simeq 10^{78}$.

I am solving it by pivoted QR, but the results get worse when adding more data points, and more polynomials.

I tried building the normal form $A^TA$, but the condition number is worse, and the smallest eigenvalue is around $-10^3$, which is strange for a symmetric positive matrix... I expect that this is due to floating point arithmetic, and it should not matter if the conditioning is better.

Could preconditioning help? I saw somewhere that rescaling the grid on which the polynomials live might make it better.

Any other ideas?

  • 2
    $\begingroup$ Are you trying to fit your data (250k points) with polynomial of the order 1000? $\endgroup$ – Vasily Mitch Feb 12 at 11:54
  • $\begingroup$ It is multidimensional data, and I have a bunch of polynomials of degree 6. In fact, each polynomial is multiplied by a gaussian centered at a different point, hence the number of parameters. $\endgroup$ – user288227 Feb 12 at 11:57

In case someone else is facing this particular issue: my matrix did not have full numerical rank, there was a bunch of singular values below $10^{-16}$, but none was exactly zero, hence the condition number blew up. However pivoted QR (in Julia) calculates this numerical rank, and the backslash operator solves the system by inverting with respect to the well-conditioned submatrix. My problem is somewhere else...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.