SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TestStatistic.h
Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 2012 Heiko Strathmann
00008  */
00009 
00010 #ifndef __TESTSTATISTIC_H_
00011 #define __TESTSTATISTIC_H_
00012 
00013 #include <shogun/base/SGObject.h>
00014 
00015 namespace shogun
00016 {
00017 
00019 enum ENullApproximationMethod
00020 {
00021     BOOTSTRAP, MMD2_SPECTRUM, MMD2_GAMMA, MMD1_GAUSSIAN, HSIC_GAMMA
00022 };
00023 
00041 class CTestStatistic : public CSGObject
00042 {
00043     public:
00044         CTestStatistic();
00045 
00046         virtual ~CTestStatistic();
00047 
00049         virtual float64_t compute_statistic()=0;
00050 
00060         virtual float64_t compute_p_value(float64_t statistic)=0;
00061 
00070         virtual float64_t compute_threshold(float64_t alpha)=0;
00071 
00077         virtual SGVector<float64_t> bootstrap_null()=0;
00078 
00083         virtual void set_bootstrap_iterations(index_t bootstrap_iterations);
00084 
00088         virtual void set_null_approximation_method(
00089                 ENullApproximationMethod null_approximation_method);
00090 
00091         inline virtual const char* get_name() const=0;
00092 
00093     private:
00094         void init();
00095 
00096     protected:
00098         index_t m_bootstrap_iterations;
00099 
00101         ENullApproximationMethod m_null_approximation_method;
00102 };
00103 
00104 }
00105 
00106 #endif /* __TESTSTATISTIC_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation