[Scilab-users] evaluate error on each parameter calculated with leastsq

Claus Futtrup cfuttrup at gmail.com
Wed Feb 19 17:32:07 CET 2014


Hi Yohan

I see that I'm not alone wondering a bit about what you'd like to do.

A mathematically solid and readily available technique to corner 
mathematical rounding errors and other errors of operation is called 
Interval Analysis.

For matlab there's INTLAB. See:
http://www.ti3.tu-harburg.de/~rump/intlab/

I'm sure it could be converted to Scilab without big trouble. Maybe I 
even have an old one laying around (??) somewhere ... maybe.

Another approach would be in a specific situation to apply the 
techniques of interval analysis, only centered around your concern ... 
and leave the rest of your script normal.

Best regards,
Claus

On 2/18/2014 15:06, Yohann wrote:
> Hi all !!
>
> First of all, thank you to all contributors of Scilab.
> However, I have a problem to calculate the estimated error on each parameter
> calculated with leastsq.
>
> For example if I have the simple following function  to fit:
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> function y = fun2fit(x, c)
>    y =  c(1)*x*x + c(2)*x + c(3);
> endfunction
>
> function e = myerror(c, x, y)
>    e = fun2fit(x, c) - y;
> endfunction
>
> // Data
> x = [ 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6]';
> y = [5.02  6.08  3.33 -0.93   -0.22  7.83  16.52 15.55  2.67 -11.42 -11.78
> 5.09 25.25]';
>
> // First guess
> c0 = [1 1 1]';
> y0 = fun2fit(x, c0);
>
> // least square
> [f, copt] = leastsq(list(myerror, x, y), c0)
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> I'd like to have an estimated error on each of the 3 element of copt.
> Any idea ?
>
> Thanks !
> Y
>
>
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/evaluate-error-on-each-parameter-calculated-with-leastsq-tp4028696.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
> .
>


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com




More information about the users mailing list