SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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 
14 #include <shogun/lib/config.h>
15 
19 
20 namespace shogun
21 {
22 
25 {
26 public:
28  CECOCStrategy();
29 
31  CECOCStrategy(CECOCEncoder *encoder, CECOCDecoder *decoder);
32 
34  virtual ~CECOCStrategy();
35 
37  virtual const char* get_name() const
38  {
39  return "ECOCStrategy";
40  }
41 
43  virtual void train_start(CMulticlassLabels *orig_labels, CBinaryLabels *train_labels);
44 
46  virtual bool train_has_more();
47 
52 
56  virtual int32_t decide_label(SGVector<float64_t> outputs);
57 
60  virtual int32_t get_num_machines();
61 
62 protected:
67 
70 
71 private:
73  void init();
74 };
75 
76 
77 }
78 
79 #endif /* end of include guard: ECOCSTRATEGY_H__ */
CECOCDecoder * m_decoder
Definition: ECOCStrategy.h:66
virtual void train_start(CMulticlassLabels *orig_labels, CBinaryLabels *train_labels)
Multiclass Labels for multi-class classification.
ECOCEncoder produce an ECOC codebook.
Definition: ECOCEncoder.h:38
virtual int32_t get_num_machines()
virtual SGVector< int32_t > train_prepare_next()
SGMatrix< int32_t > m_codebook
Definition: ECOCStrategy.h:69
virtual int32_t decide_label(SGVector< float64_t > outputs)
virtual bool train_has_more()
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
CECOCEncoder * m_encoder
Definition: ECOCStrategy.h:64
Binary Labels for binary classification.
Definition: BinaryLabels.h:37
class MulticlassStrategy used to construct generic multiclass classifiers with ensembles of binary cl...
virtual const char * get_name() const
Definition: ECOCStrategy.h:37

SHOGUN Machine Learning Toolbox - Documentation