SHOGUN
v3.2.0
|
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-2013 Heiko Strathmann 00008 */ 00009 00010 #ifndef __TwoDistributionsTestStatistic_H_ 00011 #define __TwoDistributionsTestStatistic_H_ 00012 00013 #include <shogun/statistics/TestStatistic.h> 00014 00015 namespace shogun 00016 { 00017 00018 class CFeatures; 00019 00030 class CTwoDistributionsTestStatistic : public CTestStatistic 00031 { 00032 public: 00033 CTwoDistributionsTestStatistic(); 00034 00044 CTwoDistributionsTestStatistic(CFeatures* p_and_q, index_t m); 00045 00056 CTwoDistributionsTestStatistic(CFeatures* p, CFeatures* q); 00057 00058 virtual ~CTwoDistributionsTestStatistic(); 00059 00065 virtual SGVector<float64_t> bootstrap_null(); 00066 00075 virtual float64_t compute_p_value(float64_t statistic); 00076 00085 virtual float64_t compute_threshold(float64_t alpha); 00086 00090 virtual void set_p_and_q(CFeatures* p_and_q); 00091 00095 virtual CFeatures* get_p_and_q(); 00096 00098 index_t get_m() { return m_m; } 00099 00100 virtual const char* get_name() const=0; 00101 00102 private: 00103 void init(); 00104 00105 protected: 00107 CFeatures* m_p_and_q; 00108 00110 index_t m_m; 00111 }; 00112 00113 } 00114 00115 #endif /* __TwoDistributionsTestStatistic_H_ */