yat  0.14.5pre
SvmMultiClass.h
1 #ifndef _theplu_yat_classifier_svm_multi_class_
2 #define _theplu_yat_classifier_svm_multi_class_
3 
4 // $Id: SvmMultiClass.h 1861 2009-03-12 12:05:46Z peter $
5 
6 /*
7  Copyright (C) 2009 Peter Johansson
8 
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10 
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15 
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <http://www.gnu.org/licenses/>.
23 */
24 
25 #include "SVM.h"
26 
27 #include <vector>
28 
29 namespace theplu {
30 namespace yat {
31 namespace utility {
32  class Matrix;
33 }
34 namespace classifier {
35 
36  class KernelLookup;
37  class Target;
38 
45  {
46  public:
50  SvmMultiClass(void);
51 
57  double C(void) const;
58 
65  SvmMultiClass* make_classifier(void) const;
66 
72  unsigned long int max_epochs(void) const;
73 
77  void max_epochs(unsigned long int);
78 
95  void predict(const KernelLookup& input, utility::Matrix& predict) const;
96 
100  void set_C(double);
101 
111  void train(const KernelLookup& kernel, const Target& target);
112 
113  private:
114  SVM prototype_;
115  std::vector<SVM> svm_;
116 
117  // Using compiler generated copy and assign
118  //SvmMultiClass(const SvmMultiClass&);
119  //SvmMultiClass& operator=(const SvmMultiClass&);
120  };
121 
122 }}} // of namespace classifier, yat, and theplu
123 
124 #endif
void set_C(double)
set the C-Parameter
Class for containing sample labels.
Definition: Target.h:47
unsigned long int max_epochs(void) const
void predict(const KernelLookup &input, utility::Matrix &predict) const
Generate prediction predict from input.
Support Vector Machine for more than two classes.
Definition: SvmMultiClass.h:44
Lookup into Kernel.
Definition: KernelLookup.h:67
Support Vector Machine.
Definition: SVM.h:50
Interface to GSL matrix.
Definition: Matrix.h:63
SvmMultiClass * make_classifier(void) const
Create an untrained copy of SvmMultiClass.
double C(void) const
C-parameter.
void train(const KernelLookup &kernel, const Target &target)
Fit paramaters based on training data.

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5