SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
preprocessor
DimensionReductionPreprocessor.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) 2011 Sergey Lisitsyn
8
* Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
9
*/
10
11
#ifndef DIMENSIONREDUCTIONPREPROCESSOR_H_
12
#define DIMENSIONREDUCTIONPREPROCESSOR_H_
13
14
#include <
shogun/preprocessor/DensePreprocessor.h
>
15
#include <
shogun/converter/EmbeddingConverter.h
>
16
#include <
shogun/features/Features.h
>
17
#include <
shogun/distance/Distance.h
>
18
19
namespace
shogun
20
{
21
22
class
CFeatures;
23
class
CDistance;
24
class
CKernel;
25
30
class
CDimensionReductionPreprocessor
:
public
CDensePreprocessor
<float64_t>
31
{
32
public
:
33
35
CDimensionReductionPreprocessor
();
36
42
CDimensionReductionPreprocessor
(
CEmbeddingConverter
* converter);
43
45
virtual
~CDimensionReductionPreprocessor
();
46
51
virtual
bool
init
(
CFeatures
* data);
52
57
virtual
void
cleanup
();
58
62
virtual
SGMatrix<float64_t>
apply_to_feature_matrix
(
CFeatures
* features);
63
67
virtual
SGVector<float64_t>
apply_to_feature_vector
(
SGVector<float64_t>
vector)
68
{
69
return
vector;
70
}
71
73
virtual
const
char
*
get_name
()
const
{
return
"DimensionReductionPreprocessor"
; };
74
76
virtual
EPreprocessorType
get_type
()
const
;
77
81
void
set_target_dim
(int32_t dim);
82
86
int32_t
get_target_dim
()
const
;
87
91
void
set_distance
(
CDistance
*
distance
);
92
96
CDistance
*
get_distance
()
const
;
97
101
void
set_kernel
(
CKernel
* kernel);
102
106
CKernel
*
get_kernel
()
const
;
107
108
protected
:
109
111
void
init
();
112
113
protected
:
114
116
int32_t
m_target_dim
;
117
119
CDistance
*
m_distance
;
120
122
CKernel
*
m_kernel
;
123
125
CEmbeddingConverter
*
m_converter
;
126
};
127
}
128
129
#endif
/* DIMENSIONREDUCTIONPREPROCESSOR_H_ */
SHOGUN
机器学习工具包 - 项目文档