source: trunk/test/feature_selection_test.cc @ 642

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

adding class for selecting features by random

File size: 732 bytes
RevLine 
[605]1// $Id$
2
3#include <c++_tools/classifier/FeatureSelectorIR.h>
[642]4#include <c++_tools/classifier/FeatureSelectorRandom.h>
[605]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);
[642]28  classifier::FeatureSelectorRandom f2(12);
[605]29
30  if (ok)
31    return 0;
32  return -1;
33}
Note: See TracBrowser for help on using the repository browser.