SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TestStatistic.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-2013 Heiko Strathmann
8  */
9 
10 #ifndef __TESTSTATISTIC_H_
11 #define __TESTSTATISTIC_H_
12 
13 #include <shogun/base/SGObject.h>
14 
15 namespace shogun
16 {
17 
20 {
22 };
23 
26 {
28 };
29 
47 class CTestStatistic : public CSGObject
48 {
49  public:
51 
52  virtual ~CTestStatistic();
53 
55  virtual float64_t compute_statistic()=0;
56 
66  virtual float64_t compute_p_value(float64_t statistic)=0;
67 
76  virtual float64_t compute_threshold(float64_t alpha)=0;
77 
93  virtual float64_t perform_test();
94 
107  bool perform_test(float64_t alpha);
108 
115 
120  virtual void set_bootstrap_iterations(index_t bootstrap_iterations);
121 
125  virtual void set_null_approximation_method(
126  ENullApproximationMethod null_approximation_method);
127 
129  virtual EStatisticType get_statistic_type() const=0;
130 
131  virtual const char* get_name() const=0;
132 
133  private:
134  void init();
135 
136  protected:
139 
142 };
143 
144 }
145 
146 #endif /* __TESTSTATISTIC_H_ */

SHOGUN Machine Learning Toolbox - Documentation