SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StochasticProximityEmbedding.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 Fernando José Iglesias García
8  * Copyright (C) 2012 Fernando José Iglesias García
9  */
10 
11 #ifndef STOCHASTICPROXIMITYEMBEDDING_H_
12 #define STOCHASTICPROXIMITYEMBEDDING_H_
13 #include <shogun/lib/config.h>
14 #ifdef HAVE_LAPACK
18 
19 namespace shogun
20 {
21 
24 {
27 };
28 
63 {
64 
65  public:
66 
69 
72 
78  virtual CFeatures* apply(CFeatures* features);
79 
84  void set_k(int32_t k);
85 
90  int32_t get_k() const;
91 
96  void set_strategy(ESPEStrategy strategy);
97 
102  ESPEStrategy get_strategy() const;
103 
108  void set_tolerance(float32_t tolerance);
109 
114  int32_t get_tolerance() const;
115 
120  void set_nupdates(int32_t nupdates);
121 
126  int32_t get_nupdates() const;
127 
129  virtual const char* get_name() const;
130 
131  private:
132 
134  void init();
135 
144  virtual SGMatrix<int32_t> get_neighborhood_matrix(CDistance* distance, int32_t k, int32_t N, float64_t max_dist);
145 
150  virtual CDenseFeatures< float64_t >* embed_distance(CDistance* distance);
151 
152  private:
153 
155  ESPEStrategy m_strategy;
156 
158  int32_t m_k;
159 
161  float32_t m_tolerance;
162 
164  int32_t m_nupdates;
165 
166 };
167 
168 } /* namespace shogun */
169 
170 
171 #endif /* HAVE_LAPACK */
172 #endif /* STOCHASTICPROXIMITYEMBEDDING_H_ */

SHOGUN Machine Learning Toolbox - Documentation