SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MultilabelCLRModel.h
Go to the documentation of this file.
1 /*
2  * This software is distributed under BSD 3-clause license (see LICENSE file).
3  *
4  * Copyright(C) 2014 Thoralf Klein
5  * Written(W) 2014 Thoralf Klein
6  * Written(W) 2014 Abinash Panda
7  */
8 
9 #ifndef _MULTILABEL_CLR_MODEL__H__
10 #define _MULTILABEL_CLR_MODEL__H__
11 
12 #include <shogun/lib/config.h>
14 
15 namespace shogun
16 {
17 
26 {
27 public:
30 
36  CMultilabelCLRModel(CFeatures * features, CStructuredLabels * labels);
37 
39  virtual ~CMultilabelCLRModel();
40 
42  virtual CStructuredLabels * structured_labels_factory(int32_t num_labels = 0);
43 
47  virtual int32_t get_dim() const;
48 
58  virtual SGVector<float64_t> get_joint_feature_vector(int32_t feat_idx,
59  CStructuredData * y);
60 
72  virtual CResultSet * argmax(SGVector<float64_t> w, int32_t feat_idx,
73  bool const training = true);
74 
83 
95  virtual void init_primal_opt(
96  float64_t regularization,
104 
106  virtual const char * get_name() const
107  {
108  return "MultilabelCLRModel";
109  }
110 
111 private:
112  int32_t m_num_classes;
113 
114 private:
115  void init();
116 
120 
126  SGVector<int32_t> to_sparse(SGVector<float64_t> dense_vector,
127  float64_t d_true, float64_t d_false);
128 
129 }; /* class CMultilabelCLRModel */
130 
131 } /* namespace shogun */
132 
133 #endif /* _MULTILABEL_CLR_MODEL__H__ */
134 
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)
virtual SGVector< float64_t > get_joint_feature_vector(int32_t feat_idx, CStructuredData *y)
virtual const char * get_name() const
Class MultilabelCLRModel represents application specific model and contains application dependent log...
double float64_t
Definition: common.h:50
Class CStructuredModel that represents the application specific model and contains most of the applic...
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
virtual CStructuredLabels * structured_labels_factory(int32_t num_labels=0)
The class Features is the base class of all feature objects.
Definition: Features.h:68
virtual CResultSet * argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training=true)
Base class of the components of StructuredLabels.
virtual float64_t delta_loss(CStructuredData *y1, CStructuredData *y2)
virtual int32_t get_dim() const

SHOGUN Machine Learning Toolbox - Documentation