18 psi_computed_sparse(false),
120 SG_ERROR(
"compute_joint_feature(int32_t, CStructuredData*) is not " 121 "implemented for %s!\n",
get_name());
141 SG_ERROR(
"compute_sparse_joint_feature(int32_t, CStructuredData*) is not " 142 "implemented for %s!\n",
get_name());
149 REQUIRE(ytrue_idx >= 0 || ytrue_idx < m_labels->get_num_labels(),
150 "The label index must be inside [0, num_labels-1]\n");
161 SG_ERROR(
"delta_loss(CStructuredData*, CStructuredData*) is not " 162 "implemented for %s!\n",
get_name());
167 void CStructuredModel::init()
Base class of the labels used in Structured Output (SO) problems.
void set_labels(CStructuredLabels *labs)
virtual const char * get_name() const
SGVector< float64_t > get_joint_feature_vector(int32_t feat_idx, int32_t lab_idx)
CStructuredLabels * get_labels()
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry<T>* vector is orde...
void set_features(CFeatures *feats)
virtual void init_training()
SGSparseVector< float64_t > get_sparse_joint_feature_vector(int32_t feat_idx, int32_t lab_idx)
Class SGObject is the base class of all shogun objects.
virtual CStructuredLabels * structured_labels_factory(int32_t num_labels=0)
virtual int32_t get_num_aux() const
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)
float64_t delta_loss(int32_t ytrue_idx, CStructuredData *ypred)
virtual ~CStructuredModel()
CStructuredLabels * m_labels
all of classes and functions are contained in the shogun namespace
virtual const char * get_name() const
The class Features is the base class of all feature objects.
virtual int32_t get_num_aux_con() const
virtual CStructuredData * get_label(int32_t idx)
virtual bool check_training_setup() const
CFeatures * get_features()
Base class of the components of StructuredLabels.