Menu

#276 Curve fit error estimates in SciDAVis D9

1.17
closed
nobody
None
3urgent
2017-06-21
2016-03-24
No

Hi,
I am using SciDAVis on MacOS X, 10.9.5 (and others) and have come across what appears to be a bug introduced between versions D8 and D9, in which the errors for the parameters generated by non-linear curve fitting allways appear as zero.

I am attaching a project file with an example, as well as this excerpt from the log window:

[3/24/16 12:26 PM Plot: ''Graph1'']
Non-linear fit of dataset: Table2_A595, using function: a*x + b
Y standard errors: Unknown
Scaled Levenberg-Marquardt algorithm with tolerance = 0.0001
From x = 0 to x = 20
a = 0.0535 +/- 0
b = 0.0592 +/- 0


Chi^2/doF = 0.00958
R^2 = 0.939


Iterations = 1
Status = success


[3/24/16 12:29 PM Plot: ''Graph1'']
Non-linear fit of dataset: Table2_A595, using function: a*x + b
Y standard errors: Unknown
Scaled Levenberg-Marquardt algorithm with tolerance = 0.0001
From x = 0 to x = 20
a = 0.0535 +/- 0.00514
b = 0.0592 +/- 0.0499


Chi^2/doF = 0.00958
R^2 = 0.939


Iterations = 1
Status = success

I first did the fit in D9, saved the project file, opened the file in D8 and repeated the fit. Although it would be tempting to think that the newer version reduced the errors in my data, I don't think that is the case!

Thanks,
David Goldenberg

1 Attachments

Discussion

  • David Goldenberg

    On further investigation, this bug seems to be specific to the Mac version, or at least not present in the Windows version.

    Thanks,
    David

     
  • Fellype

    Fellype - 2016-03-28

    A similar problem occurs running SciDAVis 1.D9 on Ubuntu 16.04 - Xenial (to be released next month):

    [28/03/16 12:07 Plot: ''Graph2'']
    Non-linear fit of dataset: Table2_A595, using function: a*x+b
    Y standard errors: Unknown
    Scaled Levenberg-Marquardt algorithm with tolerance = 0,0001
    From x = 0 to x = 20
    a = 0,0535322283874839 +/- 4,94225480499324e-134
    b = 0,059208102845391 +/- 1,90463876489477e-136


    Chi^2/doF = 0,00958233517495396
    R^2 = 0,939267720680874


    Iterations = 1
    Status = success


    I guess this is an issue related with GSL 2.x, at least on Ubuntu, since it is used to compute the non-linear fits. Furthermore, the version 2.x of GSL was recently introduced on some Linux distributions, then SciDAVis was not experienced many tests with this version.

     
  • Fellype

    Fellype - 2016-03-31

    Another example of an error in the error estimates - this time are "nans". In this case, I used muparser v. 1.32 with gsl 2.1. In the previous comment the muparser version was 2.2.3.

    [3/31/16 4:11 PM Plot: ''Graph2'']
    Non-linear fit of dataset: Table2_A595, using function: a*x+b
    Y standard errors: Unknown
    Scaled Levenberg-Marquardt algorithm with tolerance = 0.0001
    From x = 0 to x = 20
    a = 0.0535322283874839 +/- nan
    b = 0.059208102845391 +/- nan


    Chi^2/doF = 0.00958233517495396
    R^2 = 0.939267720680874


    Iterations = 1
    Status = success


     
  • Fellype

    Fellype - 2016-11-28

    The problem can be solved re-building SciDAVis using a patch posted on ticket #290 https://sourceforge.net/p/scidavis/scidavis-bugs/290/#8b60

     

    Last edit: Fellype 2016-11-28
  • High Performance Coder

    • status: open --> closed
     
  • High Performance Coder

    Thanks again Fellype. I hate it when people do not provide appropriate default constructor functions (or destructors for that matter) for their objects. It causes all sorts of failed expectations.

     
  • High Performance Coder

    • Group: next --> 1.17
     

Log in to post a comment.