SHOGUN  v3.0.0
 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 
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__

SHOGUN Machine Learning Toolbox - Documentation