SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
statistics
KernelTwoSampleTest.h
浏览该文件的文档.
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 KERNEL_TWO_SAMPLE_TEST_H_
11
#define KERNEL_TWO_SAMPLE_TEST_H_
12
13
#include <
shogun/statistics/TwoSampleTest.h
>
14
#include <
shogun/kernel/Kernel.h
>
15
16
namespace
shogun
17
{
18
19
class
CFeatures;
20
class
CKernel;
21
36
class
CKernelTwoSampleTest
:
public
CTwoSampleTest
37
{
38
public
:
40
CKernelTwoSampleTest
();
41
52
CKernelTwoSampleTest
(
CKernel
* kernel,
CFeatures
* p_and_q,
53
index_t
q_start);
54
66
CKernelTwoSampleTest
(
CKernel
* kernel,
CFeatures
* p,
67
CFeatures
* q);
68
70
virtual
~CKernelTwoSampleTest
();
71
75
inline
virtual
void
set_kernel
(
CKernel
* kernel)
76
{
77
/* ref before unref to prevent deleting in case objects are the same */
78
SG_REF
(kernel);
79
SG_UNREF
(
m_kernel
);
80
m_kernel
=kernel;
81
}
82
84
inline
virtual
CKernel
*
get_kernel
()
85
{
86
SG_REF
(
m_kernel
);
87
return
m_kernel
;
88
}
89
97
virtual
SGVector<float64_t>
sample_null
();
98
106
virtual
SGVector<float64_t>
compute_statistic
(
107
bool
multiple_kernels)=0;
108
110
virtual
float64_t
compute_statistic
()=0;
111
112
virtual
const
char
*
get_name
()
const
=0;
113
114
private
:
115
void
init();
116
117
protected
:
119
CKernel
*
m_kernel
;
120
};
121
122
}
123
124
#endif
/* KERNEL_TWO_SAMPLE_TEST_H_ */
SHOGUN
机器学习工具包 - 项目文档