-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathClusterizationMethods.h
More file actions
158 lines (149 loc) · 4.94 KB
/
ClusterizationMethods.h
File metadata and controls
158 lines (149 loc) · 4.94 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
///////////////////////////////////////////////////////////
// ClusterizationMethods.h
// Implementation of the Class ClusterizationMethod
// Created on: 27-Kov-2014 12:52:15
// Original author: Povilas
///////////////////////////////////////////////////////////
#if !defined(CLUSTERIZATIONMETHODS_H)
#define CLUSTERIZATIONMETHODS_H
#include "DimReductionMethod.h"
#include "alglib/dataanalysis.h"
/*! \file Clusterization
* \brief that combines clusterization methods. Class provides the number of found
* classes method and the pure virtual function get Clusterization
*/
class ClusterizationMethods : public DimReductionMethod
{
public:
/*! \fn ClusterizationMethods();
* \brief A standard constructor
*/
ClusterizationMethods();
/*! \fn ClusterizationMethods(int noOfClusters);
* \brief Overloaded constructor that accepts and initializes the number of clusters.
* \param int noOfClusters
*/
ClusterizationMethods(int noOfClusters);
/*! \fn ~ClusterizationMethods();
* \brief A standard destructor
*/
virtual ~ClusterizationMethods();
protected:
// TODO (Povilas#1#): Change all getProjectipon to run, since claserization methods does not have meaning of getProjection
/*! \fn int getNoOfReturnRows();
* \brief Returns number of rows of the input data.
* \return int - number of data rows .
*/
int getNoOfReturnRows();
/*! \fn int getNoOfClusters();
* \brief Returns number of clusters
* \return int - number of clusters.
*/
int getNoOfClusters();
/*! \fn void setNoOfReturnRows(int k);
* \brief Sets number of retrun rows.
* \param int k - number of rows.
* \return void.
*/
void setNoOfReturnRows(int k);
/*! \fn int getNoOfReturnRowFeatures();
* \brief Returns row feature quantity.
* \return int - feature count.
*/
int getNoOfReturnRowFeatures();
/*! \fn void setNoOfReturnRowFeatures(int f);
* \brief Sets number of features in the return data.
* \param int f number of features of one row in output data
* \return void.
*/
void setNoOfReturnRowFeatures(int f);
/*! \fn void initializeYMatrix();
* \brief Initializes return data structure
* \return void.
*/
void initializeYMatrix();
/*! \fn initializeYMatrix(int rows, int cols);
* \brief Initializes return data structure (rows and columns provided)
* \param int rows - with number of rows
* \param int cols - with number of cols
* \return void.
*/
void initializeYMatrix(int rows, int cols);
/*! \fn void setYMatrixDimensions(int rows, int cols);
* \brief Set output Y matrix dimensions
* \param int rows - Rows of the matrix
* \param int cols - Columns of the matrix
* \return void.
*/
void setYMatrixDimensions(int rows, int cols);
//matrix that holds the return data
/*! \fn static void writeStatData(std::string statFile, double err, double calcTime);
* \brief Writes satistical data to a file.
* \param std::string path to file.
* \param double algorithm error
* \param double calculation time in seconds
* \return void.
*/
ObjectMatrix Y;
//initialize input data
/*! \fn static void writeStatData(std::string statFile, double err, double calcTime);
* \brief Writes satistical data to a file.
* \param std::string path to file.
* \param double algorithm error
* \param double calculation time in seconds
* \return void.
*/
void initializeData(double dL, double dT);
//initialize dL + dT matrix
/*! \fn static void writeStatData(std::string statFile, double err, double calcTime);
* \brief Writes satistical data to a file.
* \param std::string path to file.
* \param double algorithm error
* \param double calculation time in seconds
* \return void.
*/
void initializeData();
/*!
* Holds size of test object set
*/
int testObjQtty ;//= 0;
/*!
* Holds size of learning object set
*/
int learnObjQtty ;// = 0;
/*!
* Holds quantty of object with uknown class
*/
int uknownClassObjQtty ;//= 0;
/*!
* Alglib data structure for learn set
*/
alglib::real_2d_array learnSet;
/*!
* Alglib data structure for test set
*/
alglib::real_2d_array testSet;
/*!
* Holds object indexes
*/
std::vector <int> objectIndex;
private:
/*! \fn void initializeXMatrix();
* \brief A method that initializes X matrix.
* \return void.
*/
void initializeXMatrix();
/*! \var int noOfClusters;
* \brief Holds number of clusters (Y matrix rows)
*/
int noOfClusters;
/*! \var int noOfFeatures;
* \brief Holds number of row features (Y row feature count)
*/
int noOfFeatures;
/*! \var int noOfRows;
* \brief Holds number of rows (Y row count)
*/
int noOfRows;
};
#endif //!defined(CLUSTERIZATIONMETHODS_H)