11 #ifndef __FACTOR_GRAPH_MODEL_H__
12 #define __FACTOR_GRAPH_MODEL_H__
51 virtual const char*
get_name()
const {
return "FactorGraphModel"; }
160 virtual int32_t
get_dim()
const;
Class CFactorType defines the way of factor parameterization.
SGVector< int32_t > get_params_mapping(const int32_t ftype_id)
SGVector< int32_t > get_global_params_mapping() const
Base class of the labels used in Structured Output (SO) problems.
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)
SGVector< float64_t > fparams_to_w()
CDynamicObjectArray * m_factor_types
void add_factor_type(CFactorType *ftype)
virtual int32_t get_dim() const
virtual SGVector< float64_t > get_joint_feature_vector(int32_t feat_idx, CStructuredData *y)
void w_to_fparams(SGVector< float64_t > w)
virtual const char * get_name() const
virtual void init_training()
CDynamicObjectArray * get_factor_types() const
virtual CResultSet * argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training=true)
CFactorGraphModel defines a model in terms of CFactorGraph and CMAPInference, where parameters are as...
Dynamic array class for CSGObject pointers that creates an array that can be used like a list or an a...
Class CStructuredModel that represents the application specific model and contains most of the applic...
void del_factor_type(const int32_t ftype_id)
The class Features is the base class of all feature objects.
SGVector< int32_t > m_w_map
virtual float64_t delta_loss(CStructuredData *y1, CStructuredData *y2)
SGVector< float64_t > m_w_cache
Base class of the components of StructuredLabels.
CFactorType * get_factor_type(const int32_t ftype_id) const