annotate main/optim/inst/test_wpolyfit.m @ 9930:d30cfca46e8a octave-forge

optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
author carandraug
date Fri, 30 Mar 2012 15:14:48 +0000
parents 24d6a5cdedfe
children b3dfecfecbf4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9930
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 2370
diff changeset
1 ## Author: Paul Kienzle <pkienzle@gmail.com>
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 2370
diff changeset
2 ## This program is granted to the public domain.
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 2370
diff changeset
3
2370
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
4 ## Tests for wpolyfit.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
5 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
6 ## Test cases are taken from the NIST Statistical Reference Datasets
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
7 ## http://www.itl.nist.gov/div898/strd/
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
8
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
9 1;
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
10
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
11 function do_test(n,x,y,p,dp,varargin)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
12 [myp,s] = wpolyfit(x,y,n,varargin{:});
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
13 %if length(varargin)==0, [myp,s] = polyfit(x,y,n); else return; end
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
14 mydp = sqrt(sumsq(inv(s.R'))'/s.df)*s.normr;
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
15 if length(varargin)>0, mydp = [mydp;0]; end %origin
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
16 %[svdp,j,svddp] = svdfit(x,y,n);
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
17 disp('parameter certified value rel. error');
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
18 [myp(:), p, abs((myp(:)-p)./p)] %, svdp, abs((svdp-p)./p) ]
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
19 disp('p-error certified value rel. error');
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
20 [mydp(:), dp, abs((mydp(:) - dp)./dp)] %, svdp, abs((svddp - dp)./dp)]
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
21 input('Press <Enter> to proceed to the next test');
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
22 endfunction
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
23
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
24 ## x y dy
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
25 data = [0.0013852 0.2144023 0.0020470
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
26 0.0018469 0.2516856 0.0022868
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
27 0.0023087 0.3070443 0.0026362
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
28 0.0027704 0.3603186 0.0029670
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
29 0.0032322 0.4260864 0.0033705
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
30 0.0036939 0.4799956 0.0036983 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
31 x=data(:,1); y=data(:,2); dy=data(:,3);
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
32 wpolyfit(x,y,dy,1);
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
33 disp('computing parameter uncertainty from monte carlo simulation...');
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
34 fflush(stdout);
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
35 n=100; p=zeros(2,n);
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
36 for i=1:n, p(:,i)=(polyfit(x,y+randn(size(y)).*dy,1)).'; end
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
37 printf("%15s %15s\n", "Coefficient", "Error");
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
38 printf("%15g %15g\n", [mean(p'); std(p')]);
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
39 input('Press <Enter> to see some sample regression lines: ');
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
40 t = [x(1), x(length(x))];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
41 [p,s] = wpolyfit(x,y,dy,1); dp=sqrt(sumsq(inv(s.R'))'/s.df)*s.normr;
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
42 hold off;
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
43 for i=1:15, plot(t,polyval(p(:)+randn(size(dp)).*dp,t),'-g;;'); hold on; end
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
44 errorbar(x,y,dy,"~b;;");
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
45 [yf,dyf]=polyconf(p,x,s,0.05,'ci');
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
46 plot(x,yf-dyf,"-r;;",x,yf+dyf,'-r;95% confidence interval;')
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
47 hold off;
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
48 input('Press <Enter> to continue with the tests: ');
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
49
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
50
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
51 ##Procedure: Linear Least Squares Regression
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
52 ##Reference: Filippelli, A., NIST.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
53 ##Model: Polynomial Class
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
54 ## 11 Parameters (B0,B1,...,B10)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
55 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
56 ## y = B0 + B1*x + B2*(x**2) + ... + B9*(x**9) + B10*(x**10) + e
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
57
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
58 ##Data:
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
59 ## y x
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
60 data = [ 0.8116 -6.860120914
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
61 0.9072 -4.324130045
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
62 0.9052 -4.358625055
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
63 0.9039 -4.358426747
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
64 0.8053 -6.955852379
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
65 0.8377 -6.661145254
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
66 0.8667 -6.355462942
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
67 0.8809 -6.118102026
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
68 0.7975 -7.115148017
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
69 0.8162 -6.815308569
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
70 0.8515 -6.519993057
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
71 0.8766 -6.204119983
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
72 0.8885 -5.853871964
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
73 0.8859 -6.109523091
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
74 0.8959 -5.79832982
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
75 0.8913 -5.482672118
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
76 0.8959 -5.171791386
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
77 0.8971 -4.851705903
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
78 0.9021 -4.517126416
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
79 0.909 -4.143573228
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
80 0.9139 -3.709075441
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
81 0.9199 -3.499489089
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
82 0.8692 -6.300769497
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
83 0.8872 -5.953504836
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
84 0.89 -5.642065153
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
85 0.891 -5.031376979
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
86 0.8977 -4.680685696
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
87 0.9035 -4.329846955
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
88 0.9078 -3.928486195
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
89 0.7675 -8.56735134
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
90 0.7705 -8.363211311
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
91 0.7713 -8.107682739
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
92 0.7736 -7.823908741
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
93 0.7775 -7.522878745
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
94 0.7841 -7.218819279
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
95 0.7971 -6.920818754
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
96 0.8329 -6.628932138
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
97 0.8641 -6.323946875
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
98 0.8804 -5.991399828
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
99 0.7668 -8.781464495
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
100 0.7633 -8.663140179
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
101 0.7678 -8.473531488
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
102 0.7697 -8.247337057
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
103 0.77 -7.971428747
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
104 0.7749 -7.676129393
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
105 0.7796 -7.352812702
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
106 0.7897 -7.072065318
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
107 0.8131 -6.774174009
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
108 0.8498 -6.478861916
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
109 0.8741 -6.159517513
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
110 0.8061 -6.835647144
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
111 0.846 -6.53165267
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
112 0.8751 -6.224098421
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
113 0.8856 -5.910094889
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
114 0.8919 -5.598599459
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
115 0.8934 -5.290645224
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
116 0.894 -4.974284616
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
117 0.8957 -4.64454848
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
118 0.9047 -4.290560426
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
119 0.9129 -3.885055584
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
120 0.9209 -3.408378962
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
121 0.9219 -3.13200249
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
122 0.7739 -8.726767166
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
123 0.7681 -8.66695597
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
124 0.7665 -8.511026475
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
125 0.7703 -8.165388579
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
126 0.7702 -7.886056648
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
127 0.7761 -7.588043762
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
128 0.7809 -7.283412422
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
129 0.7961 -6.995678626
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
130 0.8253 -6.691862621
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
131 0.8602 -6.392544977
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
132 0.8809 -6.067374056
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
133 0.8301 -6.684029655
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
134 0.8664 -6.378719832
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
135 0.8834 -6.065855188
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
136 0.8898 -5.752272167
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
137 0.8964 -5.132414673
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
138 0.8963 -4.811352704
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
139 0.9074 -4.098269308
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
140 0.9119 -3.66174277
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
141 0.9228 -3.2644011];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
142
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
143 ##Certified values:
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
144 ## p dP
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
145 target = [ -1467.48961422980 298.084530995537
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
146 -2772.17959193342 559.779865474950
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
147 -2316.37108160893 466.477572127796
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
148 -1127.97394098372 227.204274477751
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
149 -354.478233703349 71.6478660875927
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
150 -75.1242017393757 15.2897178747400
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
151 -10.8753180355343 2.23691159816033
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
152 -1.06221498588947 0.221624321934227
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
153 -0.670191154593408E-01 0.142363763154724E-01
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
154 -0.246781078275479E-02 0.535617408889821E-03
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
155 -0.402962525080404E-04 0.896632837373868E-05];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
156 if 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
157 disp("Filippelli, A., NIST.");
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
158 do_test(10, data(:,2),data(:,1),flipud(target(:,1)),flipud(target(:,2)));
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
159 endif
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
160
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
161 ##Procedure: Linear Least Squares Regression
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
162 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
163 ##Reference: Pontius, P., NIST.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
164 ## Load Cell Calibration.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
165 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
166 ##Model: Quadratic Class
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
167 ## 3 Parameters (B0,B1,B2)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
168 ## y = B0 + B1*x + B2*(x**2)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
169
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
170
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
171 ##Data: y x
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
172 data = [ \
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
173 .11019 150000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
174 .21956 300000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
175 .32949 450000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
176 .43899 600000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
177 .54803 750000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
178 .65694 900000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
179 .76562 1050000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
180 .87487 1200000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
181 .98292 1350000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
182 1.09146 1500000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
183 1.20001 1650000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
184 1.30822 1800000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
185 1.41599 1950000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
186 1.52399 2100000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
187 1.63194 2250000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
188 1.73947 2400000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
189 1.84646 2550000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
190 1.95392 2700000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
191 2.06128 2850000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
192 2.16844 3000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
193 .11052 150000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
194 .22018 300000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
195 .32939 450000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
196 .43886 600000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
197 .54798 750000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
198 .65739 900000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
199 .76596 1050000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
200 .87474 1200000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
201 .98300 1350000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
202 1.09150 1500000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
203 1.20004 1650000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
204 1.30818 1800000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
205 1.41613 1950000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
206 1.52408 2100000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
207 1.63159 2250000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
208 1.73965 2400000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
209 1.84696 2550000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
210 1.95445 2700000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
211 2.06177 2850000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
212 2.16829 3000000 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
213
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
214 ## Certified Regression Statistics
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
215 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
216 ## Standard Deviation
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
217 ## Estimate of Estimate
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
218 target = [ \
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
219 0.673565789473684E-03 0.107938612033077E-03
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
220 0.732059160401003E-06 0.157817399981659E-09
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
221 -0.316081871345029E-14 0.486652849992036E-16 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
222
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
223 if 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
224 disp("Pontius, P., NIST");
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
225 do_test(2, data(:,2),data(:,1),flipud(target(:,1)),flipud(target(:,2)));
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
226 endif
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
227
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
228
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
229
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
230 #Procedure: Linear Least Squares Regression
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
231 #Reference: Eberhardt, K., NIST.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
232 #Model: Linear Class
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
233 # 1 Parameter (B1)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
234 #
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
235 # y = B1*x + e
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
236
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
237 #Data: y x
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
238 data =[\
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
239 130 60
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
240 131 61
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
241 132 62
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
242 133 63
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
243 134 64
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
244 135 65
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
245 136 66
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
246 137 67
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
247 138 68
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
248 139 69
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
249 140 70 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
250
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
251
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
252 # Certified Regression Statistics
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
253 #
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
254 # Standard Deviation
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
255 # Estimate of Estimate
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
256 target = [ \
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
257 0 0
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
258 2.07438016528926 0.165289256198347E-01 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
259
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
260
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
261 if 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
262 disp("Eberhardt, K., NIST");
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
263 do_test(1, data(:,2),data(:,1),flipud(target(:,1)),flipud(target(:,2)),'origin');
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
264 endif
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
265
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
266
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
267 #Reference: Wampler, R. H. (1970).
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
268 # A Report of the Accuracy of Some Widely-Used Least
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
269 # Squares Computer Programs.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
270 # Journal of the American Statistical Association, 65, 549-565.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
271 #
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
272 #Model: Polynomial Class
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
273 # 6 Parameters (B0,B1,...,B5)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
274 #
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
275 # y = B0 + B1*x + B2*(x**2) + B3*(x**3)+ B4*(x**4) + B5*(x**5)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
276 #
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
277 # Certified Regression Statistics
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
278 #
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
279 # Standard Deviation
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
280 # Parameter Estimate of Estimate
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
281 target = [\
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
282 1.00000000000000 0.000000000000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
283 1.00000000000000 0.000000000000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
284 1.00000000000000 0.000000000000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
285 1.00000000000000 0.000000000000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
286 1.00000000000000 0.000000000000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
287 1.00000000000000 0.000000000000000 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
288
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
289 #Data: y x
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
290 data = [\
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
291 1 0
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
292 6 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
293 63 2
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
294 364 3
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
295 1365 4
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
296 3906 5
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
297 9331 6
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
298 19608 7
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
299 37449 8
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
300 66430 9
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
301 111111 10
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
302 177156 11
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
303 271453 12
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
304 402234 13
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
305 579195 14
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
306 813616 15
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
307 1118481 16
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
308 1508598 17
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
309 2000719 18
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
310 2613660 19
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
311 3368421 20 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
312
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
313 if 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
314 disp("Wampler1");
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
315 do_test(5, data(:,2),data(:,1),flipud(target(:,1)),flipud(target(:,2)));
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
316 endif
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
317
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
318 ##Reference: Wampler, R. H. (1970).
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
319 ## A Report of the Accuracy of Some Widely-Used Least
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
320 ## Squares Computer Programs.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
321 ## Journal of the American Statistical Association, 65, 549-565.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
322 ##Model: Polynomial Class
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
323 ## 6 Parameters (B0,B1,...,B5)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
324 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
325 ## y = B0 + B1*x + B2*(x**2) + B3*(x**3)+ B4*(x**4) + B5*(x**5)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
326 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
327 ## Certified Regression Statistics
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
328 ## Standard Deviation
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
329 ## Parameter Estimate of Estimate
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
330 target = [ \
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
331 1.00000000000000 0.000000000000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
332 0.100000000000000 0.000000000000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
333 0.100000000000000E-01 0.000000000000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
334 0.100000000000000E-02 0.000000000000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
335 0.100000000000000E-03 0.000000000000000
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
336 0.100000000000000E-04 0.000000000000000 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
337
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
338
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
339 #Data: y x
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
340 data = [ \
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
341 1.00000 0
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
342 1.11111 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
343 1.24992 2
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
344 1.42753 3
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
345 1.65984 4
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
346 1.96875 5
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
347 2.38336 6
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
348 2.94117 7
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
349 3.68928 8
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
350 4.68559 9
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
351 6.00000 10
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
352 7.71561 11
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
353 9.92992 12
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
354 12.75603 13
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
355 16.32384 14
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
356 20.78125 15
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
357 26.29536 16
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
358 33.05367 17
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
359 41.26528 18
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
360 51.16209 19
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
361 63.00000 20 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
362
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
363 if 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
364 disp("Wampler2");
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
365 do_test(5, data(:,2),data(:,1),flipud(target(:,1)),flipud(target(:,2)));
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
366 endif
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
367
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
368
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
369
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
370
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
371 ##Reference: Wampler, R. H. (1970).
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
372 ## A Report of the Accuracy of Some Widely-Used Least
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
373 ## Squares Computer Programs.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
374 ## Journal of the American Statistical Association, 65, 549-565.
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
375 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
376 ##Model: Polynomial Class
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
377 ## 6 Parameters (B0,B1,...,B5)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
378 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
379 ## y = B0 + B1*x + B2*(x**2) + B3*(x**3)+ B4*(x**4) + B5*(x**5)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
380 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
381 ## Certified Regression Statistics
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
382 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
383 ## Standard Deviation
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
384 ## Parameter Estimate of Estimate
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
385 target = [\
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
386 1.00000000000000 2152.32624678170
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
387 1.00000000000000 2363.55173469681
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
388 1.00000000000000 779.343524331583
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
389 1.00000000000000 101.475507550350
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
390 1.00000000000000 5.64566512170752
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
391 1.00000000000000 0.112324854679312 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
392
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
393 #Data: y x
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
394 data = [ \
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
395 760. 0
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
396 -2042. 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
397 2111. 2
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
398 -1684. 3
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
399 3888. 4
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
400 1858. 5
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
401 11379. 6
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
402 17560. 7
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
403 39287. 8
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
404 64382. 9
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
405 113159. 10
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
406 175108. 11
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
407 273291. 12
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
408 400186. 13
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
409 581243. 14
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
410 811568. 15
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
411 1121004. 16
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
412 1506550. 17
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
413 2002767. 18
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
414 2611612. 19
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
415 3369180. 20 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
416 if 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
417 disp("Wampler3");
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
418 do_test(5, data(:,2),data(:,1),flipud(target(:,1)),flipud(target(:,2)));
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
419 endif
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
420
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
421 ##Model: Polynomial Class
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
422 ## 6 Parameters (B0,B1,...,B5)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
423 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
424 ## y = B0 + B1*x + B2*(x**2) + B3*(x**3)+ B4*(x**4) + B5*(x**5)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
425 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
426 ## Certified Regression Statistics
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
427 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
428 ## Standard Deviation
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
429 ## Parameter Estimate of Estimate
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
430 target = [\
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
431 1.00000000000000 215232.624678170
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
432 1.00000000000000 236355.173469681
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
433 1.00000000000000 77934.3524331583
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
434 1.00000000000000 10147.5507550350
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
435 1.00000000000000 564.566512170752
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
436 1.00000000000000 11.2324854679312 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
437
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
438 #Data: y x
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
439 data = [\
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
440 75901 0
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
441 -204794 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
442 204863 2
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
443 -204436 3
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
444 253665 4
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
445 -200894 5
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
446 214131 6
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
447 -185192 7
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
448 221249 8
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
449 -138370 9
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
450 315911 10
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
451 -27644 11
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
452 455253 12
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
453 197434 13
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
454 783995 14
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
455 608816 15
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
456 1370781 16
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
457 1303798 17
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
458 2205519 18
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
459 2408860 19
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
460 3444321 20 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
461
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
462 if 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
463 disp("Wampler4");
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
464 do_test(5, data(:,2),data(:,1),flipud(target(:,1)),flipud(target(:,2)));
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
465 endif
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
466
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
467
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
468
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
469 ##Model: Polynomial Class
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
470 ## 6 Parameters (B0,B1,...,B5)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
471 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
472 ## y = B0 + B1*x + B2*(x**2) + B3*(x**3)+ B4*(x**4) + B5*(x**5)
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
473 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
474 ## Certified Regression Statistics
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
475 ##
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
476 ## Standard Deviation
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
477 ## Parameter Estimate of Estimate
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
478 target = [\
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
479 1.00000000000000 21523262.4678170
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
480 1.00000000000000 23635517.3469681
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
481 1.00000000000000 7793435.24331583
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
482 1.00000000000000 1014755.07550350
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
483 1.00000000000000 56456.6512170752
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
484 1.00000000000000 1123.24854679312 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
485
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
486 ##Data: y x
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
487 data = [ \
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
488 7590001 0
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
489 -20479994 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
490 20480063 2
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
491 -20479636 3
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
492 25231365 4
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
493 -20476094 5
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
494 20489331 6
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
495 -20460392 7
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
496 18417449 8
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
497 -20413570 9
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
498 20591111 10
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
499 -20302844 11
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
500 18651453 12
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
501 -20077766 13
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
502 21059195 14
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
503 -19666384 15
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
504 26348481 16
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
505 -18971402 17
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
506 22480719 18
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
507 -17866340 19
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
508 10958421 20 ];
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
509 if 1
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
510 disp("Wampler5");
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
511 do_test(5, data(:,2),data(:,1),flipud(target(:,1)),flipud(target(:,2)));
24d6a5cdedfe Changed the directory structure to match the package system
hauberg
parents:
diff changeset
512 endif