SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NearestCentroid.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) 2012 Philippe Tillet
8  */
9 
10 #ifndef _NEAREST_CENTROID_H__
11 #define _NEAREST_CENTROID_H__
12 
13 #include <stdio.h>
14 #include <shogun/lib/common.h>
15 #include <shogun/io/SGIO.h>
19 #include <shogun/lib/CoverTree.h>
21 
22 namespace shogun
23 {
24 
25 class CDistanceMachine;
26 
34 
35 public:
36 
39 
44 
51 
54  virtual ~CNearestCentroid();
55 
60  void set_shrinking(float64_t shrinking) {
61  m_shrinking = shrinking ;
62  }
63 
69  return m_shrinking;
70  }
71 
77  return m_centroids;
78  }
79 
80 protected:
89  virtual bool train_machine(CFeatures* data=NULL);
90 
96 private:
97  void init();
98 
99 protected:
101  int32_t m_num_classes;
102 
105 
108 
111 };
112 
113 }
114 
115 #endif

SHOGUN Machine Learning Toolbox - Documentation