LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Error -20116 finding quadradic fit

Here's the error:

Error -20116 occurred at Bad Regression.vi

Possible reason(s):

Analysis:  Feasible solution not found.

Here's my code:

Bad Regression3.png

Here's my XY data:

7280	1.22858E+7			
7312	1.25469E+7			
7344	1.25722E+7			
7376	1.21155E+7			
7408	1.13621E+7			

I noticed that if I scale down the Y, everything works out OK which tells me maybe I need to normalize my data some how. Is there some standard data prep and unprep for regressions like this?

0 Kudos
Message 1 of 5
(472 Views)

Why are you using bisquare?

 

The constant term is 1 but x^2 is >10^14, making the problem ill conditioned. The matrix elements differ by >10^14 so there are not enough bits to sort it out. 


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 2 of 5
(463 Views)

Sorry, I take that back because you have x and y swapped (mislabeled!). Your x is 7280-7480, i.e. a small relative range. You get better results if you e.g. subtract the mean from x, for example. No scaling needed.


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 3 of 5
(450 Views)

Try this.

 

 


LabVIEW Champion Do more with less code and in less time
Message 4 of 5
(446 Views)

Sorry about the mislabel. Good catch! I guess I was asking more generally. I'm pretty sure for any given dataset, I can find some manipulation that helps it fit but is there a general way to preprocess your data before fitting?

0 Kudos
Message 5 of 5
(437 Views)