SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QuadraticTimeMMD.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 __QUADRACTIMEMMD_H_
11 #define __QUADRACTIMEMMD_H_
12 
14 
15 namespace shogun
16 {
17 
18 class CFeatures;
19 class CKernel;
20 class CCustomKernel;
21 
24 {
26 };
27 
87 {
88  public:
90 
101  CQuadraticTimeMMD(CKernel* kernel, CFeatures* p_and_q, index_t m);
102 
114  CQuadraticTimeMMD(CKernel* kernel, CFeatures* p, CFeatures* q);
115 
125  CQuadraticTimeMMD(CCustomKernel* custom_kernel, index_t m);
126 
127  virtual ~CQuadraticTimeMMD();
128 
135  virtual float64_t compute_statistic();
136 
144  virtual SGVector<float64_t> compute_statistic(bool multiple_kernels);
145 
157  virtual float64_t compute_p_value(float64_t statistic);
158 
169  virtual float64_t compute_threshold(float64_t alpha);
170 
171  virtual const char* get_name() const
172  {
173  return "QuadraticTimeMMD";
174  };
175 
178  {
179  return S_QUADRATIC_TIME_MMD;
180  }
181 
182 #ifdef HAVE_LAPACK
183 
206  index_t num_eigenvalues);
207 #endif // HAVE_LAPACK
208 
215  void set_num_samples_sepctrum(index_t num_samples_spectrum);
216 
223  void set_num_eigenvalues_spectrum(index_t num_eigenvalues_spectrum);
224 
226  void set_statistic_type(EQuadraticMMDType statistic_type);
227 
249 
250  protected:
253 
256 
257  private:
258  void init();
259 
260  protected:
263 
266 
269 };
270 
271 }
272 
273 #endif /* __QUADRACTIMEMMD_H_ */

SHOGUN Machine Learning Toolbox - Documentation