SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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
EPreprocessorType
Definition: Preprocessor.h:32
virtual SGVector< float64_t > apply_to_feature_vector(SGVector< float64_t > vector)
EFeatureClass
shogun feature class
Definition: FeatureTypes.h:38
virtual const char * get_name() const
return the name of the preprocessor
void set_randomcoefficients(float64_t *randomcoeff_additive2, float64_t *randomcoeff_multiplicative2, const int32_t dim_feature_space2, const int32_t dim_input_space2, const float64_t kernelwidth2)
Template class DensePreprocessor, base class for preprocessors (cf. CPreprocessor) that apply to CDen...
double float64_t
Definition: common.h:50
void copy(const CRandomFourierGaussPreproc &feats)
EFeatureType
shogun feature type
Definition: FeatureTypes.h:19
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The class Features is the base class of all feature objects.
Definition: Features.h:68
Preprocessor CRandomFourierGaussPreproc implements Random Fourier Features for the Gauss kernel a la ...
void get_randomcoefficients(float64_t **randomcoeff_additive2, float64_t **randomcoeff_multiplicative2, int32_t *dim_feature_space2, int32_t *dim_input_space2, float64_t *kernelwidth2) const
virtual EPreprocessorType get_type() const
return a type of preprocessor
virtual SGMatrix< float64_t > apply_to_feature_matrix(CFeatures *features)

SHOGUN Machine Learning Toolbox - Documentation