Changeset 236
- Timestamp:
- Feb 21, 2005, 3:54:25 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/test_regression_local.cc
r223 r236 20 20 { 21 21 bool ok=true; 22 23 gslapi::vector x(1000);24 gslapi::vector y(1000);25 for (size_t i=0; i<1000; i++){26 x(i)=static_cast<double>(i)/100;27 y(i)=sin(x(i));28 }29 22 30 23 statistics::RegressionLinear r; 31 24 statistics::RegressionKernelBox k; 32 statistics::RegressionLocal rl(x,y,r,k,100); 25 statistics::RegressionLocal rl(r,k); 26 for (size_t i=0; i<1000; i++){ 27 double x = static_cast<double>(i)/100; 28 double y = sin(x); 29 rl.add(x, y); 30 } 33 31 rl.fit(0.1); 34 32
Note: See TracChangeset
for help on using the changeset viewer.