SHOGUN  v3.2.0
RandomFourierDotFeatures.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) 2013 Evangelos Anagnostopoulos
8  * Copyright (C) 2013 Evangelos Anagnostopoulos
9  */
10 
11 #ifndef _RANDOMFOURIER_DOTFEATURES__H__
12 #define _RANDOMFOURIER_DOTFEATURES__H__
13 
17 
18 namespace shogun
19 {
20 template <class ST> class CDenseFeatures;
21 class CDotFeatures;
22 
25 {
31 
34 };
35 
47 {
48 public:
49 
52 
61  CRandomFourierDotFeatures(CDotFeatures* features, int32_t D, KernelName kernel_name,
62  SGVector<float64_t> params);
63 
72  CRandomFourierDotFeatures(CDotFeatures* features, int32_t D, KernelName kernel_name,
74 
80 
83 
85  virtual CFeatures* duplicate() const;
86 
89 
91  virtual const char* get_name() const;
92 
93 protected:
94 
102  virtual float64_t post_dot(float64_t dot_result, index_t par_idx);
103 
109 
110 private:
111  void init(KernelName kernel_name, SGVector<float64_t> params);
112 
113 private:
115  KernelName kernel;
116 
118  SGVector<float64_t> kernel_params;
119 
121  float64_t constant;
122 };
123 }
124 
125 #endif // _RANDOMFOURIER_DOTFEATURES__H__
virtual SGVector< float64_t > generate_random_parameter_vector()
class that implements the Random Kitchen Sinks for the DotFeatures as mentioned in http://books...
int32_t index_t
Definition: common.h:60
Features that support dot products among other operations.
Definition: DotFeatures.h:41
double float64_t
Definition: common.h:48
A File access base class.
Definition: File.h:34
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:16
The class Features is the base class of all feature objects.
Definition: Features.h:62
This class implements the random fourier features for the DotFeatures framework. Basically upon the o...
virtual float64_t post_dot(float64_t dot_result, index_t par_idx)

SHOGUN Machine Learning Toolbox - Documentation