SHOGUN  5.0.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 
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__ */
CStateModel * get_state_model() const
Definition: HMSVMModel.cpp:609
Base class of the labels used in Structured Output (SO) problems.
virtual ~CHMSVMModel()
Definition: HMSVMModel.cpp:45
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:357
virtual bool check_training_setup() const
Definition: HMSVMModel.cpp:442
Class CHMSVMModel that represents the application specific model and contains the application depende...
Definition: HMSVMModel.h:31
virtual void init_training()
Definition: HMSVMModel.cpp:523
class CStateModel base, abstract class for the internal state representation used in the CHMSVMModel...
Definition: StateModel.h:30
virtual int32_t get_num_aux_con() const
Definition: HMSVMModel.cpp:513
SGVector< float64_t > get_emission_weights() const
Definition: HMSVMModel.cpp:604
virtual int32_t get_num_aux() const
Definition: HMSVMModel.cpp:508
double float64_t
Definition: common.h:50
virtual SGVector< float64_t > get_joint_feature_vector(int32_t feat_idx, CStructuredData *y)
Definition: HMSVMModel.cpp:64
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:599
virtual CResultSet * argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training=true)
Definition: HMSVMModel.cpp:160
Class CStructuredModel that represents the application specific model and contains most of the applic...
virtual const char * get_name() const
Definition: HMSVMModel.h:173
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
void set_use_plifs(bool use_plifs)
Definition: HMSVMModel.cpp:518
The class Features is the base class of all feature objects.
Definition: Features.h:68
virtual float64_t delta_loss(CStructuredData *y1, CStructuredData *y2)
Definition: HMSVMModel.cpp:348
virtual int32_t get_dim() const
Definition: HMSVMModel.cpp:51
Base class of the components of StructuredLabels.

SHOGUN Machine Learning Toolbox - Documentation