SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
preprocessor
RescaleFeatures.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) 20013 Viktor Gal
8
* Copyright (C) 2013 Viktor Gal
9
*/
10
11
#ifndef __RESCALEFEATURES_H__
12
#define __RESCALEFEATURES_H__
13
14
#include <
shogun/preprocessor/DensePreprocessor.h
>
15
16
namespace
shogun
17
{
28
class
CRescaleFeatures
:
public
CDensePreprocessor
<float64_t>
29
{
30
public
:
32
CRescaleFeatures
();
33
35
virtual
~CRescaleFeatures
();
36
42
virtual
bool
init
(
CFeatures
* features);
43
47
virtual
void
cleanup
();
48
55
virtual
SGMatrix<float64_t>
apply_to_feature_matrix
(
CFeatures
* features);
56
60
virtual
SGVector<float64_t>
apply_to_feature_vector
(
SGVector<float64_t>
vector);
61
63
virtual
const
char
*
get_name
()
const
{
return
"RescaleFeatures"
; }
64
66
virtual
EPreprocessorType
get_type
()
const
{
return
P_RESCALEFEATURES
; }
67
68
private
:
69
void
register_parameters();
70
71
protected
:
73
SGVector<float64_t>
m_min
;
75
SGVector<float64_t>
m_range
;
77
bool
m_initialized
;
78
};
79
}
80
81
#endif
/* __RESCALEFEATURES_H__ */
SHOGUN
机器学习工具包 - 项目文档