SHOGUN  v3.2.0
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_ */
virtual float64_t compute_statistic()=0
int32_t index_t
Definition: common.h:60
virtual float64_t compute_p_value(float64_t statistic)=0
virtual float64_t perform_test()
virtual void set_bootstrap_iterations(index_t bootstrap_iterations)
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:102
virtual float64_t compute_threshold(float64_t alpha)=0
double float64_t
Definition: common.h:48
virtual const char * get_name() const =0
virtual SGVector< float64_t > bootstrap_null()=0
Test statistic base class. Provides an interface for statistical tests via three methods: compute_sta...
Definition: TestStatistic.h:47
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:16
ENullApproximationMethod m_null_approximation_method
virtual EStatisticType get_statistic_type() const =0
virtual void set_null_approximation_method(ENullApproximationMethod null_approximation_method)
ENullApproximationMethod
Definition: TestStatistic.h:25

SHOGUN Machine Learning Toolbox - Documentation