SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ECOCStrategy.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 Chiyuan Zhang
8  * Copyright (C) 2012 Chiyuan Zhang
9  */
10 
11 #ifndef ECOCSTRATEGY_H__
12 #define ECOCSTRATEGY_H__
13 
17 
18 namespace shogun
19 {
20 
23 {
24 public:
26  CECOCStrategy();
27 
29  CECOCStrategy(CECOCEncoder *encoder, CECOCDecoder *decoder);
30 
32  virtual ~CECOCStrategy();
33 
35  virtual const char* get_name() const
36  {
37  return "ECOCStrategy";
38  }
39 
41  virtual void train_start(CMulticlassLabels *orig_labels, CBinaryLabels *train_labels);
42 
44  virtual bool train_has_more();
45 
50 
54  virtual int32_t decide_label(SGVector<float64_t> outputs);
55 
58  virtual int32_t get_num_machines();
59 
60 protected:
65 
68 
69 private:
71  void init();
72 };
73 
74 
75 }
76 
77 #endif /* end of include guard: ECOCSTRATEGY_H__ */
CECOCDecoder * m_decoder
Definition: ECOCStrategy.h:64
virtual void train_start(CMulticlassLabels *orig_labels, CBinaryLabels *train_labels)
Multiclass Labels for multi-class classification.
ECOCEncoder produce an ECOC codebook.
Definition: ECOCEncoder.h:35
virtual int32_t get_num_machines()
virtual SGVector< int32_t > train_prepare_next()
SGMatrix< int32_t > m_codebook
Definition: ECOCStrategy.h:67
virtual int32_t decide_label(SGVector< float64_t > outputs)
virtual bool train_has_more()
CECOCEncoder * m_encoder
Definition: ECOCStrategy.h:62
Binary Labels for binary classification.
Definition: BinaryLabels.h:36
class MulticlassStrategy used to construct generic multiclass classifiers with ensembles of binary cl...
virtual const char * get_name() const
Definition: ECOCStrategy.h:35

SHOGUN Machine Learning Toolbox - Documentation