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 <shogun/lib/config.h>
16 
17 #include <shogun/lib/common.h>
20 
21 namespace shogun {
49 public:
52 
55 
60 
66  virtual SGMatrix<float64_t> apply_to_feature_matrix(CFeatures* features); // ref count fo the feature matrix???
67 
68 
75 
80 
85 
93  virtual bool init(CFeatures *f);
94 
98  void set_kernelwidth(const float64_t width);
99 
104  float64_t get_kernelwidth( ) const;
105 
111  void get_randomcoefficients(float64_t ** randomcoeff_additive2,
112  float64_t ** randomcoeff_multiplicative2,
113  int32_t *dim_feature_space2, int32_t *dim_input_space2, float64_t* kernelwidth2 ) const;
114 
121  void set_randomcoefficients(float64_t *randomcoeff_additive2,
122  float64_t * randomcoeff_multiplicative2,
123  const int32_t dim_feature_space2, const int32_t dim_input_space2, const float64_t kernelwidth2);
124 
129  void set_dim_input_space(const int32_t dim);
130 
136  void set_dim_feature_space(const int32_t dim);
137 
150 
151 
155  int32_t get_dim_input_space() const;
156 
160  int32_t get_dim_feature_space() const;
161 
165  void cleanup();
166 
168  virtual const char* get_name() const { return "RandomFourierGaussPreproc"; }
169 
171  virtual EPreprocessorType get_type() const { return P_RANDOMFOURIERGAUSS; }
172 
173 protected:
174 
178  void copy(const CRandomFourierGaussPreproc & feats); // helper for two constructors
179 
180 
185 
190 
195 
200 
201 
206 
211 
215  bool test_rfinited() const;
216 
222 
228 };
229 }
230 #endif

SHOGUN Machine Learning Toolbox - Documentation