SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RandomFourierGaussPreproc.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) 2010-2011 Alexander Binder
8  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  * Copyright (C) 2010-2011 Berlin Institute of Technology
10  */
11 
12 #ifndef _RANDOMFOURIERGAUSSPREPROC__H__
13 #define _RANDOMFOURIERGAUSSPREPROC__H__
14 
15 #include <vector>
16 #include <algorithm>
17 
18 #include <shogun/lib/config.h>
19 
20 #include <shogun/lib/common.h>
23 
24 namespace shogun {
52 public:
55 
58 
63 
69  virtual SGMatrix<float64_t> apply_to_feature_matrix(CFeatures* features); // ref count fo the feature matrix???
70 
71 
78 
83 
88 
96  virtual bool init(CFeatures *f);
97 
101  void set_kernelwidth(const float64_t width);
102 
107  float64_t get_kernelwidth( ) const;
108 
114  void get_randomcoefficients(float64_t ** randomcoeff_additive2,
115  float64_t ** randomcoeff_multiplicative2,
116  int32_t *dim_feature_space2, int32_t *dim_input_space2, float64_t* kernelwidth2 ) const;
117 
124  void set_randomcoefficients(float64_t *randomcoeff_additive2,
125  float64_t * randomcoeff_multiplicative2,
126  const int32_t dim_feature_space2, const int32_t dim_input_space2, const float64_t kernelwidth2);
127 
132  void set_dim_input_space(const int32_t dim);
133 
139  void set_dim_feature_space(const int32_t dim);
140 
153 
154 
158  int32_t get_dim_input_space() const;
159 
163  int32_t get_dim_feature_space() const;
164 
168  void cleanup();
169 
171  virtual const char* get_name() const { return "RandomFourierGaussPreproc"; }
172 
174  virtual EPreprocessorType get_type() const { return P_RANDOMFOURIERGAUSS; }
175 
176 protected:
177 
181  void copy(const CRandomFourierGaussPreproc & feats); // helper for two constructors
182 
183 
188 
193 
198 
203 
204 
209 
214 
218  bool test_rfinited() const;
219 
225 
231 };
232 }
233 #endif

SHOGUN Machine Learning Toolbox - Documentation