SHOGUN  v3.0.0
 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 
18 
19 namespace shogun
20 {
21 
22 enum EStateModelType;
23 
30 {
31  public:
33  CHMSVMModel();
34 
43  CHMSVMModel(CFeatures* features, CStructuredLabels* labels, EStateModelType smt, int32_t num_obs=0, bool use_plifs=false);
44 
46  virtual ~CHMSVMModel();
47 
52  virtual int32_t get_dim() const;
53 
67 
81  virtual CResultSet* argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training = true);
82 
91 
104  virtual void init_primal_opt(
105  float64_t regularization,
110 
115  virtual bool check_training_setup() const;
116 
125  virtual int32_t get_num_aux() const;
126 
134  virtual int32_t get_num_aux_con() const;
135 
140  void set_use_plifs(bool use_plifs);
141 
147  virtual void init_training();
148 
154 
160 
165  CStateModel* get_state_model() const;
166 
171  virtual const char* get_name() const { return "HMSVMModel"; }
172 
173  private:
174  /* internal initialization */
175  void init();
176 
177  private:
179  int32_t m_num_obs;
180 
182  int32_t m_num_aux;
183 
185  CStateModel* m_state_model;
186 
188  SGMatrix< float64_t > m_transmission_weights;
189 
191  SGVector< float64_t > m_emission_weights;
192 
194  int32_t m_num_plif_nodes;
195 
197  CDynamicObjectArray* m_plif_matrix;
198 
200  bool m_use_plifs;
201 
202 }; /* class CHMSVMModel */
203 
204 } /* namespace shogun */
205 
206 #endif /* _HMSVM_MODEL__H__ */

SHOGUN Machine Learning Toolbox - Documentation