SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConjugateIndex.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2011 Sergey Lisitsyn
8  * Copyright (C) 2011 Sergey Lisitsyn
9  */
10 
11 #ifndef CONJUGATEINDEX_H_
12 #define CONJUGATEINDEX_H_
13 #ifdef HAVE_LAPACK
14 #include <shogun/machine/Machine.h>
17 
18 namespace shogun
19 {
20 
21 class CLabels;
22 class CDotFeatures;
23 class CFeatures;
24 
34 class CConjugateIndex : public CMachine
35 {
36 
37 public:
39 
40 
44 
49  CConjugateIndex(CFeatures* train_features, CLabels* train_labels);
50 
54  virtual ~CConjugateIndex();
55 
59  virtual void set_features(CFeatures* features);
60 
65 
70  virtual CMulticlassLabels* apply_multiclass(CFeatures* data=NULL);
71 
76  virtual float64_t apply_one(int32_t idx);
77 
81  virtual const char* get_name() const { return "ConjugateIndex"; };
82 
87 
88 protected:
89 
94  virtual bool train_machine(CFeatures* data=NULL);
95 
97  void clean_classes();
98 
105  float64_t conjugate_index(SGVector<float64_t> feature_vector, int32_t label);
106 
107 protected:
108 
110  int32_t m_num_classes;
111 
114 
117 
120 
121 };
122 
123 }
124 #endif /* HAVE_LAPACK */
125 #endif /* CONJUGATEINDEX_H_ */

SHOGUN Machine Learning Toolbox - Documentation