SHOGUN  v2.0.0
 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 
17 
18 namespace shogun
19 {
20 
21 template <class T> class CDenseFeatures;
22 class CHMM;
23 
41 class CFKFeatures: public CDenseFeatures<float64_t>
42 {
43  public:
45  CFKFeatures();
46 
53  CFKFeatures(int32_t size, CHMM* p, CHMM* n);
54 
56  CFKFeatures(const CFKFeatures &orig);
57 
58  virtual ~CFKFeatures();
59 
65  void set_models(CHMM* p, CHMM* n);
66 
71  inline void set_a(float64_t a)
72  {
73  weight_a=a;
74  }
75 
80  inline float64_t get_a()
81  {
82  return weight_a;
83  }
84 
89  virtual float64_t* set_feature_matrix();
90 
97 
102  inline float64_t get_weight_a() { return weight_a; };
103 
105  inline virtual const char* get_name() const { return "FKFeatures"; }
106 
107  protected:
116  int32_t num, int32_t& len, float64_t* target=NULL);
117 
124  void compute_feature_vector(float64_t* addr, int32_t num, int32_t& len);
125 
131  float64_t deriv_a(float64_t a, int32_t dimension=-1) ;
132 
133  private:
134  void init();
135 
136  protected:
147 };
148 }
149 #endif

SHOGUN Machine Learning Toolbox - Documentation