source: trunk/test/feature_selection_test.cc @ 831

Last change on this file since 831 was 831, checked in by Peter, 15 years ago

Refs #185.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1// $Id: feature_selection_test.cc 831 2007-03-27 13:22:09Z peter $
2
3/*
4  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
5  Copyright (C) 2007 Peter Johansson
6
7  This file is part of the yat library, http://lev.thep.lu.se/trac/yat
8
9  The yat library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of the
12  License, or (at your option) any later version.
13
14  The yat library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  General Public License for more details.
18
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22  02111-1307, USA.
23*/
24
25#include "yat/classifier/FeatureSelectorIR.h"
26#include "yat/classifier/FeatureSelectorRandom.h"
27#include "yat/statistics/AUC.h"
28
29#include <fstream>
30#include <iostream>
31#include <string>
32
33using namespace theplu::yat;
34
35int main(const int argc,const char* argv[])
36{ 
37  std::ostream* error;
38  if (argc>1 && argv[1]==std::string("-v"))
39    error = &std::cerr;
40  else {
41    error = new std::ofstream("/dev/null");
42    if (argc>1)
43      std::cout << "feature_selection -v : for printing extra information\n";
44  }
45  *error << "testing ferature_selection" << std::endl;
46  bool ok = true;
47
48  statistics::AUC roc;
49  classifier::FeatureSelectorIR f(roc, 12);
50  classifier::FeatureSelectorRandom f2(12);
51
52  if (ok)
53    return 0;
54  return -1;
55}
Note: See TracBrowser for help on using the repository browser.