SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LinearTimeMMD.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 __LINEARTIMEMMD_H_
11 #define __LINEARTIMEMMD_H_
12 
14 #include <shogun/kernel/Kernel.h>
15 #include <shogun/lib/external/libqp.h>
16 
17 namespace shogun
18 {
19 
20 class CStreamingFeatures;
21 class CFeatures;
22 
76 {
77 public:
79 
91  CStreamingFeatures* q, index_t m, index_t blocksize=10000);
92 
93  virtual ~CLinearTimeMMD();
94 
103  virtual float64_t compute_statistic();
104 
112  virtual SGVector<float64_t> compute_statistic(bool multiple_kernels);
113 
127  virtual float64_t compute_p_value(float64_t statistic);
128 
144  virtual float64_t perform_test();
145 
158  virtual float64_t compute_threshold(float64_t alpha);
159 
168 
187  virtual void compute_statistic_and_variance(
188  SGVector<float64_t>& statistic, SGVector<float64_t>& variance,
189  bool multiple_kernels=false);
190 
195  virtual void compute_statistic_and_Q(
197 
208 
212  void set_blocksize(index_t blocksize) { m_blocksize=blocksize; }
213 
215  virtual void set_p_and_q(CFeatures* p_and_q);
216 
218  virtual CFeatures* get_p_and_q();
219 
224 
229 
232  {
233  return S_LINEAR_TIME_MMD;
234  }
235 
239  inline void set_simulate_h0(bool simulate_h0) { m_simulate_h0=simulate_h0; }
240 
241 
242  virtual const char* get_name() const
243  {
244  return "LinearTimeMMD";
245  }
246 
247 private:
248  void init();
249 
250 protected:
253 
256 
259 
263 };
264 
265 }
266 
267 #endif /* __LINEARTIMEMMD_H_ */
268 

SHOGUN Machine Learning Toolbox - Documentation