SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FKFeatures.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) 1999-2009 Soeren Sonnenburg
8  * Written (W) 1999-2008 Gunnar Raetsch
9  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
10  */
11 
12 #ifndef _CFKFEATURES__H__
13 #define _CFKFEATURES__H__
14 
15 #include <shogun/lib/config.h>
16 
19 
20 namespace shogun
21 {
22 
23 template <class T> class CDenseFeatures;
24 class CHMM;
25 
43 class CFKFeatures: public CDenseFeatures<float64_t>
44 {
45  public:
47  CFKFeatures();
48 
55  CFKFeatures(int32_t size, CHMM* p, CHMM* n);
56 
58  CFKFeatures(const CFKFeatures &orig);
59 
60  virtual ~CFKFeatures();
61 
67  void set_models(CHMM* p, CHMM* n);
68 
73  inline void set_a(float64_t a)
74  {
75  weight_a=a;
76  }
77 
82  inline float64_t get_a()
83  {
84  return weight_a;
85  }
86 
91  virtual float64_t* set_feature_matrix();
92 
99 
104  inline float64_t get_weight_a() { return weight_a; };
105 
107  virtual const char* get_name() const { return "FKFeatures"; }
108 
109  protected:
118  int32_t num, int32_t& len, float64_t* target=NULL);
119 
126  void compute_feature_vector(float64_t* addr, int32_t num, int32_t& len);
127 
133  float64_t deriv_a(float64_t a, int32_t dimension=-1) ;
134 
135  private:
136  void init();
137 
138  protected:
149 };
150 }
151 #endif

SHOGUN Machine Learning Toolbox - Documentation