SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
CrossValidationPrintOutput.h
浏览该文件的文档.
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 __CROSSVALIDATIONPRINTOUTPUT_H_
13 #define __CROSSVALIDATIONPRINTOUTPUT_H_
14 
15 #include <shogun/lib/config.h>
16 
18 
19 namespace shogun
20 {
21 
22 class CMachine;
23 class CLabels;
24 class CEvaluation;
25 
29 {
30 public:
31 
34 
37 
39  virtual const char* get_name() const { return "CrossValidationPrintOutput"; }
40 
46  virtual void init_num_runs(index_t num_runs, const char* prefix="");
47 
52  virtual void init_num_folds(index_t num_folds, const char* prefix="");
53 
59  virtual void update_run_index(index_t run_index,
60  const char* prefix="");
61 
67  virtual void update_fold_index(index_t fold_index,
68  const char* prefix="");
69 
75  virtual void update_train_indices(SGVector<index_t> indices,
76  const char* prefix="");
77 
83  virtual void update_test_indices(SGVector<index_t> indices,
84  const char* prefix="");
85 
91  virtual void update_trained_machine(CMachine* machine,
92  const char* prefix="");
93 
99  virtual void update_test_result(CLabels* results,
100  const char* prefix="");
101 
107  virtual void update_test_true_result(CLabels* results,
108  const char* prefix="");
109 
115  virtual void update_evaluation_result(float64_t result,
116  const char* prefix="");
117 
118 protected:
124  char* append_tab_to_string(const char* string);
125 };
126 
127 }
128 
129 #endif /* __CROSSVALIDATIONPRINTOUTPUT_H_ */
virtual void update_test_result(CLabels *results, const char *prefix="")
int32_t index_t
Definition: common.h:62
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
virtual void update_test_true_result(CLabels *results, const char *prefix="")
A generic learning machine interface.
Definition: Machine.h:143
virtual void update_test_indices(SGVector< index_t > indices, const char *prefix="")
Class for managing individual folds in cross-validation.
virtual void update_train_indices(SGVector< index_t > indices, const char *prefix="")
double float64_t
Definition: common.h:50
virtual void update_run_index(index_t run_index, const char *prefix="")
virtual void init_num_folds(index_t num_folds, const char *prefix="")
virtual void update_fold_index(index_t fold_index, const char *prefix="")
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
Class for outputting cross-validation intermediate results to the standard output. Simply prints all messages it gets.
virtual void update_trained_machine(CMachine *machine, const char *prefix="")
virtual void init_num_runs(index_t num_runs, const char *prefix="")
virtual void update_evaluation_result(float64_t result, const char *prefix="")

SHOGUN 机器学习工具包 - 项目文档