How do I fit a 2D surface z=f(x,y) with a polynomial in numpy with full cross terms?
How do I fit a 2D surface z=f(x,y) with a polynomial in numpy with
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is inherently numerically ill-conditioned but you could do something like this:
The more terms you add, the worse things get, numerically. Are you sure you want a polynomial interpolant?
There are other bases for polynomials for which the matrix of values is not so badly conditioned but I can’t remember what they are called; any college-level numerical analysis textbook would have this material, though.