SHOGUN  v3.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 #include <shogun/lib/SGVector.h>
17 
18 namespace shogun
19 {
20 
21 class CMachine;
22 class CLabels;
23 class CEvaluation;
24 
42 {
43 public:
44 
47  {
50  m_num_runs=0;
51  m_num_folds=0;
52  }
53 
56 
58  virtual const char* get_name() const=0;
59 
65  virtual void init_num_runs(index_t num_runs, const char* prefix="")
66  {
67  m_num_runs=num_runs;
68  }
69 
74  virtual void init_num_folds(index_t num_folds, const char* prefix="")
75  {
76  m_num_folds=num_folds;
77  }
78 
82  virtual void init_expose_labels(CLabels* labels) { }
83 
85  virtual void post_init() { }
86 
92  virtual void update_run_index(index_t run_index,
93  const char* prefix="")
94  {
95  m_current_run_index=run_index;
96  }
97 
103  virtual void update_fold_index(index_t fold_index,
104  const char* prefix="")
105  {
106  m_current_fold_index=fold_index;
107  }
108 
115  const char* prefix="") {}
116 
123  const char* prefix="") {}
124 
130  virtual void update_trained_machine(CMachine* machine,
131  const char* prefix="") {}
132 
138  virtual void update_test_result(CLabels* results,
139  const char* prefix="") {}
140 
146  virtual void update_test_true_result(CLabels* results,
147  const char* prefix="") {}
148 
151  virtual void post_update_results() {}
152 
158  virtual void update_evaluation_result(float64_t result,
159  const char* prefix="") {}
160 
161 protected:
164 
167 
170 
173 };
174 
175 }
176 
177 #endif /* __CROSSVALIDATIONOUTPUT_H_ */

SHOGUN Machine Learning Toolbox - Documentation