From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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
(2,490 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. 

0 Kudos
Message 2 of 5
(2,481 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.

0 Kudos
Message 3 of 5
(2,468 Views)
Message 4 of 5
(2,464 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
(2,455 Views)