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 __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 00092 virtual const char* get_name() const=0; 00093 00094 private: 00095 void init(); 00096 00097 protected: 00099 CFeatures* m_p_and_q; 00100 00102 index_t m_m; 00103 }; 00104 00105 } 00106 00107 #endif /* __TwoDistributionsTestStatistic_H_ */