SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
converter
StochasticProximityEmbedding.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 Fernando José Iglesias García
8
* Copyright (C) 2012-2013 Fernando José Iglesias García
9
*/
10
11
#ifndef STOCHASTICPROXIMITYEMBEDDING_H_
12
#define STOCHASTICPROXIMITYEMBEDDING_H_
13
#include <
shogun/lib/config.h
>
14
#ifdef HAVE_EIGEN3
15
#include <
shogun/converter/EmbeddingConverter.h
>
16
#include <
shogun/features/Features.h
>
17
#include <
shogun/distance/Distance.h
>
18
19
namespace
shogun
20
{
21
23
enum
ESPEStrategy
24
{
25
SPE_GLOBAL
,
26
SPE_LOCAL
,
27
};
28
63
class
CStochasticProximityEmbedding
:
public
CEmbeddingConverter
64
{
65
66
public
:
67
69
CStochasticProximityEmbedding
();
70
72
virtual
~CStochasticProximityEmbedding
();
73
79
virtual
CFeatures
*
apply
(
CFeatures
* features);
80
85
void
set_k
(int32_t k);
86
91
int32_t
get_k
()
const
;
92
97
void
set_strategy
(
ESPEStrategy
strategy);
98
103
ESPEStrategy
get_strategy
()
const
;
104
109
void
set_tolerance
(
float32_t
tolerance);
110
115
int32_t
get_tolerance
()
const
;
116
121
void
set_nupdates
(int32_t nupdates);
122
127
int32_t
get_nupdates
()
const
;
128
133
void
set_max_iteration
(
const
int32_t max_iteration);
134
139
int32_t
get_max_iteration
()
const
;
140
142
virtual
const
char
*
get_name
()
const
;
143
144
private
:
145
147
void
init();
148
153
virtual
CDenseFeatures< float64_t >
* embed_distance(
CDistance
*
distance
);
154
155
private
:
156
158
ESPEStrategy
m_strategy;
159
161
int32_t m_k;
162
164
float32_t
m_tolerance;
165
167
int32_t m_nupdates;
168
170
int32_t m_max_iteration;
171
172
};
173
174
}
/* namespace shogun */
175
176
177
#endif
/* HAVE_EIGEN3 */
178
#endif
/* STOCHASTICPROXIMITYEMBEDDING_H_ */
SHOGUN
机器学习工具包 - 项目文档