วันอังคารที่ 17 สิงหาคม พ.ศ. 2553

gnuplot regression log

gnuplot> f(x) = m*x + b
gnuplot> fit f(x) 'out.csv' using 1:2 via m,b


Iteration 0
WSSR : 1.58427 delta(WSSR)/WSSR : 0
delta(WSSR) : 0 limit for stopping : 1e-05
lambda : 0.733154

initial set of free parameter values

m = 1
b = 1
/

Iteration 1
WSSR : 0.0239845 delta(WSSR)/WSSR : -65.0538
delta(WSSR) : -1.56029 limit for stopping : 1e-05
lambda : 0.0733154

resultant parameter values

m = 1.05812
b = 1.42664
/

Iteration 2
WSSR : 0.0105842 delta(WSSR)/WSSR : -1.26608
delta(WSSR) : -0.0134004 limit for stopping : 1e-05
lambda : 0.00733154

resultant parameter values

m = 0.833844
b = 1.51427
/

Iteration 3
WSSR : 0.0105676 delta(WSSR)/WSSR : -0.00157136
delta(WSSR) : -1.66054e-05 limit for stopping : 1e-05
lambda : 0.000733154

resultant parameter values

m = 0.821303
b = 1.51741
/

Iteration 4
WSSR : 0.0105676 delta(WSSR)/WSSR : -4.60464e-10
delta(WSSR) : -4.86599e-12 limit for stopping : 1e-05
lambda : 7.33154e-05

resultant parameter values

m = 0.821296
b = 1.51741

After 4 iterations the fit converged.
final sum of squares of residuals : 0.0105676
rel. change during last iteration : -4.60464e-10

degrees of freedom (FIT_NDF) : 5
rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 0.045973
variance of residuals (reduced chisquare) = WSSR/ndf : 0.00211351

Final set of parameters Asymptotic Standard Error
======================= ==========================

m = 0.821296 +/- 0.1417 (17.25%)
b = 1.51741 +/- 0.03881 (2.558%)


correlation matrix of the fit parameters:

m b
m 1.000
b -0.894 1.000
gnuplot> plot 'out..csv' using 1:2, f(x)

got m,b from Final Set Params
m = 0.821296
b =
1.51741  

ref : agh

ไม่มีความคิดเห็น:

LinkWithin

Related Posts Plugin for WordPress, Blogger...