SHOGUN
v3.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
statistics
TestStatistic.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 __TESTSTATISTIC_H_
11
#define __TESTSTATISTIC_H_
12
13
#include <
shogun/base/SGObject.h
>
14
15
namespace
shogun
16
{
17
19
enum
EStatisticType
20
{
21
S_LINEAR_TIME_MMD
,
S_QUADRATIC_TIME_MMD
,
S_HSIC
22
};
23
25
enum
ENullApproximationMethod
26
{
27
BOOTSTRAP
,
MMD2_SPECTRUM
,
MMD2_GAMMA
,
MMD1_GAUSSIAN
,
HSIC_GAMMA
28
};
29
47
class
CTestStatistic
:
public
CSGObject
48
{
49
public
:
50
CTestStatistic
();
51
52
virtual
~CTestStatistic
();
53
55
virtual
float64_t
compute_statistic
()=0;
56
66
virtual
float64_t
compute_p_value
(
float64_t
statistic)=0;
67
76
virtual
float64_t
compute_threshold
(
float64_t
alpha)=0;
77
93
virtual
float64_t
perform_test
();
94
107
bool
perform_test
(
float64_t
alpha);
108
114
virtual
SGVector<float64_t>
bootstrap_null
()=0;
115
120
virtual
void
set_bootstrap_iterations
(
index_t
bootstrap_iterations);
121
125
virtual
void
set_null_approximation_method
(
126
ENullApproximationMethod
null_approximation_method);
127
129
virtual
EStatisticType
get_statistic_type
()
const
=0;
130
131
virtual
const
char
*
get_name
()
const
=0;
132
133
private
:
134
void
init();
135
136
protected
:
138
index_t
m_bootstrap_iterations
;
139
141
ENullApproximationMethod
m_null_approximation_method
;
142
};
143
144
}
145
146
#endif
/* __TESTSTATISTIC_H_ */
SHOGUN
Machine Learning Toolbox - Documentation