SHOGUN  v2.0.0
 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/base/SGObject.h>
16 
17 namespace shogun
18 {
19 
20 class CMachine;
21 class CLabels;
22 class CEvaluation;
23 
41 {
42 public:
43 
46  {
49  m_num_runs=0;
50  m_num_folds=0;
51  }
52 
55 
57  virtual const char* get_name() const=0;
58 
64  virtual void init_num_runs(index_t num_runs, const char* prefix="")
65  {
66  m_num_runs=num_runs;
67  }
68 
73  virtual void init_num_folds(index_t num_folds, const char* prefix="")
74  {
75  m_num_folds=num_folds;
76  }
77 
81  virtual void init_expose_labels(CLabels* labels) { }
82 
84  virtual void post_init() { }
85 
91  virtual void update_run_index(index_t run_index,
92  const char* prefix="")
93  {
94  m_current_run_index=run_index;
95  }
96 
102  virtual void update_fold_index(index_t fold_index,
103  const char* prefix="")
104  {
105  m_current_fold_index=fold_index;
106  }
107 
114  const char* prefix="") {}
115 
122  const char* prefix="") {}
123 
129  virtual void update_trained_machine(CMachine* machine,
130  const char* prefix="") {}
131 
137  virtual void update_test_result(CLabels* results,
138  const char* prefix="") {}
139 
145  virtual void update_test_true_result(CLabels* results,
146  const char* prefix="") {}
147 
150  virtual void post_update_results() {}
151 
157  virtual void update_evaluation_result(float64_t result,
158  const char* prefix="") {}
159 
160 protected:
163 
166 
169 
172 };
173 
174 }
175 
176 #endif /* __CROSSVALIDATIONOUTPUT_H_ */

SHOGUN Machine Learning Toolbox - Documentation