1850 |
04 Mar 09 |
peter |
// $Id$ |
1850 |
04 Mar 09 |
peter |
2 |
|
1850 |
04 Mar 09 |
peter |
3 |
/* |
4359 |
23 Aug 23 |
peter |
Copyright (C) 2009, 2012 Peter Johansson |
1850 |
04 Mar 09 |
peter |
5 |
|
1850 |
04 Mar 09 |
peter |
This file is part of the yat library, http://dev.thep.lu.se/yat |
1850 |
04 Mar 09 |
peter |
7 |
|
1850 |
04 Mar 09 |
peter |
The yat library is free software; you can redistribute it and/or |
1850 |
04 Mar 09 |
peter |
modify it under the terms of the GNU General Public License as |
1850 |
04 Mar 09 |
peter |
published by the Free Software Foundation; either version 3 of the |
1850 |
04 Mar 09 |
peter |
License, or (at your option) any later version. |
1850 |
04 Mar 09 |
peter |
12 |
|
1850 |
04 Mar 09 |
peter |
The yat library is distributed in the hope that it will be useful, |
1850 |
04 Mar 09 |
peter |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1850 |
04 Mar 09 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1850 |
04 Mar 09 |
peter |
General Public License for more details. |
1850 |
04 Mar 09 |
peter |
17 |
|
1850 |
04 Mar 09 |
peter |
You should have received a copy of the GNU General Public License |
1850 |
04 Mar 09 |
peter |
along with yat. If not, see <http://www.gnu.org/licenses/>. |
1850 |
04 Mar 09 |
peter |
20 |
*/ |
1850 |
04 Mar 09 |
peter |
21 |
|
2881 |
18 Nov 12 |
peter |
22 |
#include <config.h> |
2881 |
18 Nov 12 |
peter |
23 |
|
1850 |
04 Mar 09 |
peter |
24 |
#include "Suite.h" |
1850 |
04 Mar 09 |
peter |
25 |
|
1850 |
04 Mar 09 |
peter |
26 |
#include "yat/classifier/IGP.h" |
1850 |
04 Mar 09 |
peter |
27 |
#include "yat/classifier/MatrixLookup.h" |
1850 |
04 Mar 09 |
peter |
28 |
#include "yat/classifier/Target.h" |
1850 |
04 Mar 09 |
peter |
29 |
#include "yat/statistics/EuclideanDistance.h" |
1850 |
04 Mar 09 |
peter |
30 |
|
1850 |
04 Mar 09 |
peter |
31 |
#include <cstddef> |
1850 |
04 Mar 09 |
peter |
32 |
#include <fstream> |
1850 |
04 Mar 09 |
peter |
33 |
#include <iostream> |
1850 |
04 Mar 09 |
peter |
34 |
#include <sstream> |
1850 |
04 Mar 09 |
peter |
35 |
|
1850 |
04 Mar 09 |
peter |
36 |
using namespace theplu::yat; |
1850 |
04 Mar 09 |
peter |
37 |
|
1850 |
04 Mar 09 |
peter |
38 |
int main(int argc,char* argv[]) |
4200 |
19 Aug 22 |
peter |
39 |
{ |
1850 |
04 Mar 09 |
peter |
40 |
test::Suite suite(argc, argv); |
1850 |
04 Mar 09 |
peter |
41 |
suite.err() << "testing IGP" << std::endl; |
1850 |
04 Mar 09 |
peter |
42 |
|
1850 |
04 Mar 09 |
peter |
43 |
classifier::MatrixLookup ml(10,10); |
1850 |
04 Mar 09 |
peter |
44 |
std::vector<std::string> labels(10, "yes"); |
1850 |
04 Mar 09 |
peter |
45 |
labels[0]="no"; |
1850 |
04 Mar 09 |
peter |
46 |
classifier::Target target(labels); |
1850 |
04 Mar 09 |
peter |
47 |
classifier::IGP<statistics::EuclideanDistance> igp(ml, target); |
1850 |
04 Mar 09 |
peter |
48 |
|
1850 |
04 Mar 09 |
peter |
49 |
return suite.return_value(); |
1850 |
04 Mar 09 |
peter |
50 |
} |