SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
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__ */
CStateModel * get_state_model() const
Definition: HMSVMModel.cpp:606
Base class of the labels used in Structured Output (SO) problems.
virtual ~CHMSVMModel()
Definition: HMSVMModel.cpp:43
virtual bool check_training_setup() const
Definition: HMSVMModel.cpp:439
virtual void init_primal_opt(float64_t regularization, SGMatrix< float64_t > &A, SGVector< float64_t > a, SGMatrix< float64_t > B, SGVector< float64_t > &b, SGVector< float64_t > lb, SGVector< float64_t > ub, SGMatrix< float64_t > &C)
Definition: HMSVMModel.cpp:354
Class CHMSVMModel that represents the application specific model and contains the application depende...
Definition: HMSVMModel.h:29
virtual void init_training()
Definition: HMSVMModel.cpp:520
class CStateModel base, abstract class for the internal state representation used in the CHMSVMModel...
Definition: StateModel.h:28
virtual int32_t get_num_aux_con() const
Definition: HMSVMModel.cpp:510
SGVector< float64_t > get_emission_weights() const
Definition: HMSVMModel.cpp:601
virtual int32_t get_num_aux() const
Definition: HMSVMModel.cpp:505
double float64_t
Definition: common.h:48
virtual SGVector< float64_t > get_joint_feature_vector(int32_t feat_idx, CStructuredData *y)
Definition: HMSVMModel.cpp:62
Dynamic array class for CSGObject pointers that creates an array that can be used like a list or an a...
SGMatrix< float64_t > get_transmission_weights() const
Definition: HMSVMModel.cpp:596
virtual CResultSet * argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training=true)
Definition: HMSVMModel.cpp:158
Class CStructuredModel that represents the application specific model and contains most of the applic...
virtual const char * get_name() const
Definition: HMSVMModel.h:171
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:16
void set_use_plifs(bool use_plifs)
Definition: HMSVMModel.cpp:515
The class Features is the base class of all feature objects.
Definition: Features.h:62
virtual float64_t delta_loss(CStructuredData *y1, CStructuredData *y2)
Definition: HMSVMModel.cpp:345
virtual int32_t get_dim() const
Definition: HMSVMModel.cpp:49
Base class of the components of StructuredLabels.

SHOGUN Machine Learning Toolbox - Documentation