SHOGUN  v3.0.1
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
MulticlassSOLabels.h
浏览该文件的文档.
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_SO_LABELS__H__
12 #define _MULTICLASS_SO_LABELS__H__
13 
15 #include <shogun/lib/SGVector.h>
18 
19 namespace shogun
20 {
21 
22 class CMulticlassSOLabels;
23 
30 {
33 
39 
45  {
46  if ( base_data->get_structured_data_type() == SDT_REAL )
47  return (CRealNumber*) base_data;
48  else
49  SG_SERROR("base_data must be of dynamic type CRealNumber\n")
50 
51  return NULL;
52  }
53 
55  virtual const char* get_name() const { return "RealNumber"; }
56 
59 };
60 
67 {
68  public:
71 
77 
79  virtual ~CMulticlassSOLabels();
80 
85  inline int32_t get_num_classes() { return m_num_classes; }
86 
88  virtual const char* get_name() const { return "MulticlassSOLabels"; }
89 
90  private:
91  void init();
92 
93  private:
95  int32_t m_num_classes;
96 
97 }; /* CMulticlassSOLabels */
98 
99 } /* namespace shogun */
100 
101 #endif /* _MULTICLASS_SO_LABELS__H__ */
Base class of the labels used in Structured Output (SO) problems.
static CRealNumber * obtain_from_generic(CStructuredData *base_data)
virtual const char * get_name() const
virtual EStructuredDataType get_structured_data_type() const
double float64_t
Definition: common.h:48
virtual const char * get_name() const
CRealNumber(float64_t val)
STRUCTURED_DATA_TYPE(SDT_REAL)
#define SG_SERROR(...)
Definition: SGIO.h:181
Class CRealNumber to be used in the application of Structured Output (SO) learning to multiclass clas...
Class CMulticlassSOLabels to be used in the application of Structured Output (SO) learning to multicl...
Base class of the components of StructuredLabels.

SHOGUN Machine Learning Toolbox - Documentation