source: trunk/test/feature_selection_test.cc @ 642

Last change on this file since 642 was 642, checked in by Peter, 16 years ago

adding class for selecting features by random

File size: 732 bytes
Line 
1// $Id$
2
3#include <c++_tools/classifier/FeatureSelectorIR.h>
4#include <c++_tools/classifier/FeatureSelectorRandom.h>
5#include <c++_tools/statistics/ROC.h>
6
7#include <fstream>
8#include <iostream>
9#include <string>
10
11using namespace theplu;
12
13int main(const int argc,const char* argv[])
14{ 
15  std::ostream* error;
16  if (argc>1 && argv[1]==std::string("-v"))
17    error = &std::cerr;
18  else {
19    error = new std::ofstream("/dev/null");
20    if (argc>1)
21      std::cout << "feature_selection -v : for printing extra information\n";
22  }
23  *error << "testing ferature_selection" << std::endl;
24  bool ok = true;
25
26  statistics::ROC roc;
27  classifier::FeatureSelectorIR f(roc, 12);
28  classifier::FeatureSelectorRandom f2(12);
29
30  if (ok)
31    return 0;
32  return -1;
33}
Note: See TracBrowser for help on using the repository browser.