SHOGUN  v2.0.0
 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/common.h>
21 
22 namespace shogun {
50 public:
53 
56 
61 
67  virtual SGMatrix<float64_t> apply_to_feature_matrix(CFeatures* features); // ref count fo the feature matrix???
68 
69 
76 
81 
86 
94  virtual bool init(CFeatures *f);
95 
99  void set_kernelwidth(const float64_t width);
100 
105  float64_t get_kernelwidth( ) const;
106 
112  void get_randomcoefficients(float64_t ** randomcoeff_additive2,
113  float64_t ** randomcoeff_multiplicative2,
114  int32_t *dim_feature_space2, int32_t *dim_input_space2, float64_t* kernelwidth2 ) const;
115 
122  void set_randomcoefficients(float64_t *randomcoeff_additive2,
123  float64_t * randomcoeff_multiplicative2,
124  const int32_t dim_feature_space2, const int32_t dim_input_space2, const float64_t kernelwidth2);
125 
130  void set_dim_input_space(const int32_t dim);
131 
137  void set_dim_feature_space(const int32_t dim);
138 
151 
152 
156  int32_t get_dim_input_space() const;
157 
161  int32_t get_dim_feature_space() const;
162 
166  void cleanup();
167 
169  virtual inline const char* get_name() const { return "RandomFourierGaussPreproc"; }
170 
172  virtual inline EPreprocessorType get_type() const { return P_RANDOMFOURIERGAUSS; }
173 
174 protected:
175 
179  void copy(const CRandomFourierGaussPreproc & feats); // helper for two constructors
180 
181 
186 
191 
196 
201 
202 
207 
212 
216  bool test_rfinited() const;
217 
223 
229 };
230 }
231 #endif

SHOGUN Machine Learning Toolbox - Documentation