SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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__

SHOGUN Machine Learning Toolbox - Documentation