SHOGUN  v3.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MulticlassModel.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 José Iglesias García
8  * Copyright (C) 2012 Fernando José Iglesias García
9  */
10 
11 #ifndef _MULTICLASS_MODEL__H__
12 #define _MULTICLASS_MODEL__H__
13 
15 
16 namespace shogun
17 {
18 
25 {
26 
27  public:
30 
36  CMulticlassModel(CFeatures* features, CStructuredLabels* labels);
37 
39  virtual ~CMulticlassModel();
40 
45  virtual int32_t get_dim() const;
46 
60 
74  virtual CResultSet* argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training = true);
75 
84 
97  virtual void init_primal_opt(
98  float64_t regularization,
103 
105  virtual const char* get_name() const { return "MulticlassModel"; }
106 
107  private:
108  void init();
109 
112  float64_t delta_loss(int32_t y1_idx, float64_t y2);
113 
114  private:
116  int32_t m_num_classes;
117 
118 }; /* MulticlassModel */
119 
120 } /* namespace shogun */
121 
122 #endif /* _MULTICLASS_MODEL__H__ */
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 float64_t delta_loss(CStructuredData *y1, CStructuredData *y2)
virtual CResultSet * argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training=true)
virtual SGVector< float64_t > get_joint_feature_vector(int32_t feat_idx, CStructuredData *y)
virtual const char * get_name() const
double float64_t
Definition: common.h:48
virtual int32_t get_dim() const
Class CStructuredModel that represents the application specific model and contains most of the applic...
The class Features is the base class of all feature objects.
Definition: Features.h:62
Class CMulticlassModel that represents the application specific model and contains the application de...
Base class of the components of StructuredLabels.

SHOGUN Machine Learning Toolbox - Documentation