Changeset 236


Ignore:
Timestamp:
Feb 21, 2005, 3:54:25 PM (17 years ago)
Author:
Peter
Message:

modified to suit new interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/test_regression_local.cc

    r223 r236  
    2020
    2121  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   }
    2922 
    3023  statistics::RegressionLinear r;
    3124  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  }
    3331  rl.fit(0.1);
    3432   
Note: See TracChangeset for help on using the changeset viewer.