SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
14 #include <shogun/lib/config.h>
15 
19 
20 namespace shogun
21 {
22 template <class ST> class CDenseFeatures;
23 class CDotFeatures;
24 
27 {
33 
36 };
37 
49 {
50 public:
51 
54 
63  CRandomFourierDotFeatures(CDotFeatures* features, int32_t D, KernelName kernel_name,
64  SGVector<float64_t> params);
65 
74  CRandomFourierDotFeatures(CDotFeatures* features, int32_t D, KernelName kernel_name,
76 
82 
85 
87  virtual CFeatures* duplicate() const;
88 
91 
93  virtual const char* get_name() const;
94 
95 protected:
96 
104  virtual float64_t post_dot(float64_t dot_result, index_t par_idx);
105 
111 
112 private:
113  void init(KernelName kernel_name, SGVector<float64_t> params);
114 
115 private:
117  KernelName kernel;
118 
120  SGVector<float64_t> kernel_params;
121 
123  float64_t constant;
124 };
125 }
126 
127 #endif // _RANDOMFOURIER_DOTFEATURES__H__
virtual SGVector< float64_t > generate_random_parameter_vector()
class that implements the Random Kitchen Sinks (RKS) for the DotFeatures as mentioned in http://books...
virtual const char * get_name() const
int32_t index_t
Definition: common.h:62
virtual CFeatures * duplicate() const
Features that support dot products among other operations.
Definition: DotFeatures.h:44
double float64_t
Definition: common.h:50
A File access base class.
Definition: File.h:34
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
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