SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HMSVMModel.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) 2012 Fernando Jose Iglesias Garcia
8  * Copyright (C) 2012 Fernando Jose Iglesias Garcia
9  */
10 
11 #ifndef _HMSVM_MODEL__H__
12 #define _HMSVM_MODEL__H__
13 
14 #include <shogun/lib/config.h>
15 
20 
21 namespace shogun
22 {
23 
24 enum EStateModelType;
25 
32 {
33  public:
35  CHMSVMModel();
36 
45  CHMSVMModel(CFeatures* features, CStructuredLabels* labels, EStateModelType smt, int32_t num_obs=0, bool use_plifs=false);
46 
48  virtual ~CHMSVMModel();
49 
54  virtual int32_t get_dim() const;
55 
69 
83  virtual CResultSet* argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training = true);
84 
93 
106  virtual void init_primal_opt(
107  float64_t regularization,
112 
117  virtual bool check_training_setup() const;
118 
127  virtual int32_t get_num_aux() const;
128 
136  virtual int32_t get_num_aux_con() const;
137 
142  void set_use_plifs(bool use_plifs);
143 
149  virtual void init_training();
150 
156 
162 
167  CStateModel* get_state_model() const;
168 
173  virtual const char* get_name() const { return "HMSVMModel"; }
174 
175  private:
176  /* internal initialization */
177  void init();
178 
179  private:
181  int32_t m_num_obs;
182 
184  int32_t m_num_aux;
185 
187  CStateModel* m_state_model;
188 
190  SGMatrix< float64_t > m_transmission_weights;
191 
193  SGVector< float64_t > m_emission_weights;
194 
196  int32_t m_num_plif_nodes;
197 
199  CDynamicObjectArray* m_plif_matrix;
200 
202  bool m_use_plifs;
203 
204 }; /* class CHMSVMModel */
205 
206 } /* namespace shogun */
207 
208 #endif /* _HMSVM_MODEL__H__ */

SHOGUN Machine Learning Toolbox - Documentation