SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CrossValidationOutput.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 Sergey Lisitsyn
8  * Written (W) 2012 Heiko Strathmann
9  *
10  */
11 
12 #ifndef __CROSSVALIDATIONOUTPUT_H_
13 #define __CROSSVALIDATIONOUTPUT_H_
14 
15 #include <shogun/lib/config.h>
16 
17 #include <shogun/base/SGObject.h>
18 #include <shogun/lib/SGVector.h>
19 
20 namespace shogun
21 {
22 
23 class CMachine;
24 class CLabels;
25 class CEvaluation;
26 
44 {
45 public:
46 
49  {
52  m_num_runs=0;
53  m_num_folds=0;
54  }
55 
58 
60  virtual const char* get_name() const=0;
61 
67  virtual void init_num_runs(index_t num_runs, const char* prefix="")
68  {
69  m_num_runs=num_runs;
70  }
71 
76  virtual void init_num_folds(index_t num_folds, const char* prefix="")
77  {
78  m_num_folds=num_folds;
79  }
80 
84  virtual void init_expose_labels(CLabels* labels) { }
85 
87  virtual void post_init() { }
88 
94  virtual void update_run_index(index_t run_index,
95  const char* prefix="")
96  {
97  m_current_run_index=run_index;
98  }
99 
105  virtual void update_fold_index(index_t fold_index,
106  const char* prefix="")
107  {
108  m_current_fold_index=fold_index;
109  }
110 
117  const char* prefix="") {}
118 
125  const char* prefix="") {}
126 
132  virtual void update_trained_machine(CMachine* machine,
133  const char* prefix="") {}
134 
140  virtual void update_test_result(CLabels* results,
141  const char* prefix="") {}
142 
148  virtual void update_test_true_result(CLabels* results,
149  const char* prefix="") {}
150 
153  virtual void post_update_results() {}
154 
160  virtual void update_evaluation_result(float64_t result,
161  const char* prefix="") {}
162 
163 protected:
166 
169 
172 
175 };
176 
177 }
178 
179 #endif /* __CROSSVALIDATIONOUTPUT_H_ */

SHOGUN Machine Learning Toolbox - Documentation