SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
preprocessor
RandomFourierGaussPreproc.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) 2010-2011 Alexander Binder
8
* Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9
* Copyright (C) 2010-2011 Berlin Institute of Technology
10
*/
11
12
#ifndef _RANDOMFOURIERGAUSSPREPROC__H__
13
#define _RANDOMFOURIERGAUSSPREPROC__H__
14
15
#include <vector>
16
#include <algorithm>
17
18
#include <
shogun/lib/common.h
>
19
#include <
shogun/mathematics/Math.h
>
20
#include <
shogun/preprocessor/DensePreprocessor.h
>
21
22
namespace
shogun {
49
class
CRandomFourierGaussPreproc
:
public
CDensePreprocessor
<float64_t> {
50
public
:
52
CRandomFourierGaussPreproc
();
53
55
CRandomFourierGaussPreproc
(
const
CRandomFourierGaussPreproc
& pr);
56
60
~CRandomFourierGaussPreproc
();
61
67
virtual
SGMatrix<float64_t>
apply_to_feature_matrix
(
CFeatures
* features);
// ref count fo the feature matrix???
68
69
75
virtual
SGVector<float64_t>
apply_to_feature_vector
(
SGVector<float64_t>
vector);
76
80
virtual
EFeatureType
get_feature_type
();
81
85
virtual
EFeatureClass
get_feature_class
();
86
94
virtual
bool
init
(
CFeatures
*f);
95
99
void
set_kernelwidth
(
const
float64_t
width);
100
105
float64_t
get_kernelwidth
( )
const
;
106
112
void
get_randomcoefficients
(
float64_t
** randomcoeff_additive2,
113
float64_t
** randomcoeff_multiplicative2,
114
int32_t *dim_feature_space2, int32_t *dim_input_space2,
float64_t
* kernelwidth2 )
const
;
115
122
void
set_randomcoefficients
(
float64_t
*randomcoeff_additive2,
123
float64_t
* randomcoeff_multiplicative2,
124
const
int32_t dim_feature_space2,
const
int32_t dim_input_space2,
const
float64_t
kernelwidth2);
125
130
void
set_dim_input_space
(
const
int32_t dim);
131
137
void
set_dim_feature_space
(
const
int32_t dim);
138
150
bool
init_randomcoefficients
();
151
152
156
int32_t
get_dim_input_space
()
const
;
157
161
int32_t
get_dim_feature_space
()
const
;
162
166
void
cleanup
();
167
169
virtual
const
char
*
get_name
()
const
{
return
"RandomFourierGaussPreproc"
; }
170
172
virtual
EPreprocessorType
get_type
()
const
{
return
P_RANDOMFOURIERGAUSS
; }
173
174
protected
:
175
179
void
copy
(
const
CRandomFourierGaussPreproc
& feats);
// helper for two constructors
180
181
185
float64_t
kernelwidth
;
186
190
float64_t
cur_kernelwidth
;
191
195
int32_t
dim_input_space
;
196
200
int32_t
cur_dim_input_space
;
201
202
206
int32_t
dim_feature_space
;
207
211
int32_t
cur_dim_feature_space
;
212
216
bool
test_rfinited
()
const
;
217
222
float64_t
*
randomcoeff_additive
;
223
228
float64_t
*
randomcoeff_multiplicative
;
229
};
230
}
231
#endif
SHOGUN
机器学习工具包 - 项目文档