source: trunk/test/test_regression_local.cc @ 223

Last change on this file since 223 was 223, checked in by Peter, 17 years ago

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 609 bytes
Line 
1// $Id: test_regression_local.cc 223 2005-01-28 00:19:58Z peter $
2
3// C++ tools include
4////////////////////
5#include "RegressionKernelBox.h"
6#include "RegressionLinear.h"
7#include "RegressionLocal.h"
8#include "vector.h"
9
10
11// Standard includes
12////////////////////
13#include <iostream>
14#include <cmath>
15
16using namespace theplu;
17
18int main()
19
20{ 
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 
30  statistics::RegressionLinear r;
31  statistics::RegressionKernelBox k;
32  statistics::RegressionLocal rl(x,y,r,k,100);
33  rl.fit(0.1);
34   
35  if (ok)
36    return 0;
37  return -1;
38}
Note: See TracBrowser for help on using the repository browser.