SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
MulticlassLabels.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) 1999-2009 Soeren Sonnenburg
8  * Written (W) 1999-2008 Gunnar Raetsch
9  * Written (W) 2011 Heiko Strathmann
10  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
11  */
12 
13 #ifndef _MULTICLASS_LABELS__H__
14 #define _MULTICLASS_LABELS__H__
15 
16 #include <shogun/lib/config.h>
17 
18 #include <shogun/lib/common.h>
19 #include <shogun/io/File.h>
23 #include <shogun/lib/SGMatrix.h>
24 
25 namespace shogun
26 {
27  class CFile;
28  class CBinaryLabels;
29  class CMulticlassLabels;
30  class CDenseLabels;
31 
37 {
38  public:
41 
46  CMulticlassLabels(int32_t num_labels);
47 
53 
58  CMulticlassLabels(CFile* loader);
59 
62 
69  virtual void ensure_valid(const char* context=NULL);
70 
75  virtual ELabelType get_label_type() const;
76 
83 
91 
98  int32_t get_num_classes();
99 
106 
114  void set_multiclass_confidences(int32_t i, SGVector<float64_t> confidences);
115 
122  void allocate_confidences_for(int32_t n_classes);
123 
125  virtual const char* get_name() const { return "MulticlassLabels"; }
126 #ifndef SWIG // SWIG should skip this part
127  virtual CLabels* shallow_subset_copy();
128 #endif
129 
130  private:
132  void init();
133 
134  protected:
135 
138 };
139 }
140 #endif
void allocate_confidences_for(int32_t n_classes)
virtual CLabels * shallow_subset_copy()
CBinaryLabels * get_binary_for_class(int32_t i)
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
virtual void ensure_valid(const char *context=NULL)
SGVector< float64_t > get_unique_labels()
SGMatrix< float64_t > m_multiclass_confidences
Multiclass Labels for multi-class classification.
SGVector< float64_t > get_multiclass_confidences(int32_t i)
A File access base class.
Definition: File.h:34
virtual const char * get_name() const
void set_multiclass_confidences(int32_t i, SGVector< float64_t > confidences)
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
virtual ELabelType get_label_type() const
Binary Labels for binary classification.
Definition: BinaryLabels.h:37
Dense integer or floating point labels.
Definition: DenseLabels.h:35
ELabelType
Definition: LabelTypes.h:15

SHOGUN Machine Learning Toolbox - Documentation