SHOGUN
v3.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
converter
EmbeddingConverter.h
Go to the documentation of this file.
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 Sergey Lisitsyn
9
*/
10
11
#ifndef EMBEDDINGCONVERTER_H_
12
#define EMBEDDINGCONVERTER_H_
13
14
#include <
shogun/converter/Converter.h
>
15
#include <
shogun/features/Features.h
>
16
#include <
shogun/features/DenseFeatures.h
>
17
#include <
shogun/distance/Distance.h
>
18
#include <
shogun/kernel/Kernel.h
>
19
20
namespace
shogun
21
{
22
23
class
CFeatures;
24
class
CDistance;
25
class
CKernel;
26
31
class
CEmbeddingConverter
:
public
CConverter
32
{
33
public
:
34
36
CEmbeddingConverter
();
37
39
virtual
~CEmbeddingConverter
();
40
45
virtual
CFeatures
*
apply
(
CFeatures
* features) = 0;
46
52
virtual
CDenseFeatures<float64_t>
*
embed
(
CFeatures
* features);
53
57
void
set_target_dim
(int32_t dim);
58
62
int32_t
get_target_dim
()
const
;
63
67
void
set_distance
(
CDistance
*
distance
);
68
72
CDistance
*
get_distance
()
const
;
73
77
void
set_kernel
(
CKernel
* kernel);
78
82
CKernel
*
get_kernel
()
const
;
83
84
virtual
const
char
*
get_name
()
const
{
return
"EmbeddingConverter"
; };
85
86
protected
:
87
89
void
init
();
90
91
protected
:
92
94
int32_t
m_target_dim
;
95
97
CDistance
*
m_distance
;
98
100
CKernel
*
m_kernel
;
101
};
102
}
103
104
#endif
/* DIMENSIONREDUCTIONPREPROCESSOR_H_ */
SHOGUN
Machine Learning Toolbox - Documentation