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

CRETE Denis denis.crete at thalesgroup.com
Wed Feb 19 16:05:34 CET 2014


Dear Yohann
The (x,y) dataset does not look like a parabola... (it resembles more  a type of x*sin(x) function). 
Trying to fit this dataset with a parabola, will  not only give unreliable result, but also will put a high challenge to error estimation algorithms...
Denis

-----Message d'origine-----
De : users [mailto:users-bounces at lists.scilab.org] De la part de Yohann
Envoyé : mardi 18 février 2014 15:07
À : users at lists.scilab.org
Objet : [Scilab-users] evaluate error on each parameter calculated with leastsq

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



More information about the users mailing list