Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _HMSVM_MODEL__H__
00012 #define _HMSVM_MODEL__H__
00013
00014 #include <shogun/structure/StructuredModel.h>
00015 #include <shogun/structure/HMSVMLabels.h>
00016 #include <shogun/structure/StateModelTypes.h>
00017 #include <shogun/structure/StateModel.h>
00018
00019 namespace shogun
00020 {
00021
00022 enum EStateModelType;
00023
00029 class CHMSVMModel : public CStructuredModel
00030 {
00031 public:
00033 CHMSVMModel();
00034
00042 CHMSVMModel(CFeatures* features, CStructuredLabels* labels, EStateModelType smt, int32_t num_obs);
00043
00045 virtual ~CHMSVMModel();
00046
00051 virtual int32_t get_dim() const;
00052
00065 virtual SGVector< float64_t > get_joint_feature_vector(int32_t feat_idx, CStructuredData* y);
00066
00080 virtual CResultSet* argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training = true);
00081
00089 virtual float64_t delta_loss(CStructuredData* y1, CStructuredData* y2);
00090
00101 virtual void init_opt(
00102 SGMatrix< float64_t > & A, SGVector< float64_t > a,
00103 SGMatrix< float64_t > B, SGVector< float64_t > & b,
00104 SGVector< float64_t > lb, SGVector< float64_t > ub,
00105 SGMatrix < float64_t > & C);
00106
00111 virtual bool check_training_setup() const;
00112
00121 virtual int32_t get_num_aux() const;
00122
00130 virtual int32_t get_num_aux_con() const;
00131
00132 private:
00133
00134 void init();
00135
00136 private:
00138 int32_t m_num_states;
00139
00141 int32_t m_num_obs;
00142
00144 int32_t m_num_aux;
00145
00147 CStateModel* m_state_model;
00148
00150 SGMatrix< float64_t > m_transmission_weights;
00151
00153 SGVector< float64_t > m_emission_weights;
00154
00155 };
00156
00157 }
00158
00159 #endif