SHOGUN
v1.1.0
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
shogun
converter
MultidimensionalScaling.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 Berlin Institute of Technology and Max-Planck-Society
9
*/
10
11
#ifndef MULTIDIMENSIONALSCALING_H_
12
#define MULTIDIMENSIONALSCALING_H_
13
#include <
shogun/lib/config.h
>
14
#ifdef HAVE_LAPACK
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
59
class
CMultidimensionalScaling
:
public
CEmbeddingConverter
60
{
61
public
:
62
63
/* constructor */
64
CMultidimensionalScaling
();
65
66
/* destructor */
67
virtual
~CMultidimensionalScaling
();
68
73
virtual
CSimpleFeatures<float64_t>
*
embed_distance
(
CDistance
* distance);
74
80
virtual
CFeatures
*
apply
(
CFeatures
* features);
81
83
const
char
*
get_name
()
const
;
84
88
SGVector<float64_t>
get_eigenvalues
()
const
;
89
95
void
set_landmark_number
(int32_t num);
96
100
int32_t
get_landmark_number
()
const
;
101
105
void
set_landmark
(
bool
landmark);
106
110
bool
get_landmark
()
const
;
111
113
protected
:
114
116
virtual
void
init
();
117
122
SGMatrix<float64_t>
classic_embedding
(
SGMatrix<float64_t>
distance_matrix);
123
128
SGMatrix<float64_t>
landmark_embedding
(
SGMatrix<float64_t>
distance_matrix);
129
134
virtual
SGMatrix<float64_t>
process_distance_matrix
(
SGMatrix<float64_t>
distance_matrix);
135
137
protected
:
138
140
SGVector<float64_t>
m_eigenvalues
;
141
143
bool
m_landmark
;
144
146
int32_t
m_landmark_number
;
147
149
protected
:
150
154
static
void
*
run_triangulation_thread
(
void
* p);
155
162
static
SGVector<int32_t>
shuffle
(int32_t count, int32_t total_count);
163
164
};
165
166
}
167
#endif
/* HAVE_LAPACK */
168
#endif
/* MULTIDIMENSIONALSCALING_H_ */
SHOGUN
Machine Learning Toolbox - Documentation