-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSOMMDS.cpp
More file actions
61 lines (50 loc) · 1.24 KB
/
SOMMDS.cpp
File metadata and controls
61 lines (50 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
///////////////////////////////////////////////////////////
// SOMMDS.cpp
// Implementation of the Class SOMMDS
// Created on: 07-Lie-2013 20:07:32
// Original author: Povilas
///////////////////////////////////////////////////////////
/*! \class SOMMDS
\brief A class of methods and attributes for SOMMDS algorithm.
*/
#include "SOMMDS.h"
#include "SOM.h"
SOMMDS::SOMMDS()
{
}
SOMMDS::~SOMMDS()
{
}
//SOMMDS::SOMMDS(double eps, int max_iter, int d, int kx, int ky, int e_hat):SMACOF(eps, max_iter, d), SOM(kx, ky, e_hat){
SOMMDS::SOMMDS(double eps, int max_iter, int d, int kx, int ky, int e_hat): SOM(kx, ky, e_hat, true)
{
this->eps = eps;
this->maxIter = max_iter;
this->d = d;
}
ObjectMatrix SOMMDS::getProjection()
{
ObjectMatrix M_ws;
M_ws = SOM::getProjection();
// som_qe = SOM::getQuantizationError();
// X = M_ws;
smcf = new SMACOF (eps, maxIter, d, M_ws);
// mds_error = SMACOF::getStress();
return smcf->getProjection();
}
double SOMMDS::getSOMQuantizationError()
{
return SOM::getQuantizationError();
}
/*double SOMMDS::getMDSStressError()
{
return MDS::getStress();
}*/
double SOMMDS::getStress()
{
return smcf->getStress();
}
ObjectMatrix SOMMDS::getX()
{
return SMACOF::X;
}