-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathValidateParams.h
More file actions
240 lines (223 loc) · 7.77 KB
/
ValidateParams.h
File metadata and controls
240 lines (223 loc) · 7.77 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
///////////////////////////////////////////////////////////
// ValidateParams.h
// Implementation of the Class ValidateParams
// Created on: 03-Vas-2014 21:44:17
// Original author: Povilas
///////////////////////////////////////////////////////////
#if !defined(VALIDATEPARAMS_H)
#define VALIDATEPARAMS_H
#include <string>
#include "InitDamisService.h"
/** \brief Class that actually performs input parameter and arff file object validation
*
*/
class ValidateParams
{
public:
/** \brief Constructor
* \param InitDamisService* pointer of the InitDamisService object
*
*/
ValidateParams(InitDamisService *inFile);
/** \brief Destructor
*
*/
virtual ~ValidateParams();
/** \brief Method that returns the validation result and deletes input file if parameters are not valid
* \return bool validation result
*/
bool isValid();
///Preprocessing components
/** \brief Validate data normalization parameters
*
* \param bool normalization type
* \param double mean or l bound
* \param double std or ubound
* \param int predictive calulus time
* \return void
*
*/
void normData(bool normMeanStd, double a, double b, int maxCalcTime);
/** \brief Validate data transpose parameters
*
* \param int predictive calulus time
* \return void
*
*/
void transposeData(int maxCalcTime);
/** \brief Validate data splitting parameters
*
* \param bool reshufle data objects
* \param double relative object count in firs set
* \param double relative object count in second set
* \param int predictive calulus time
* \return void
*
*/
void splitData(bool reshufleObjects,double firstSubsetPerc, double secondSubsetPerc, int maxCalcTime);
/** \brief Validate data filtering parameters
*
* \param bool return either filtered data or outliers
* \param double Z value
* \param int attribute index
* \param int predictive calulus time
* \return void
*
*/
void filterData (bool retFilteredData, double zValue, int attrIndex, int maxCalcTime);
/** \brief Validate data cleaning parameters
*
* \param int predictive calulus time
* \return void
*
*/
void cleanData(int maxCalcTime);
///Statistical primitives components
/** \brief Validate the parameters of the statistic calculations
*
* \param int predictive calulus time
* \return void
*
*/
void statPrimitives (int maxCalcTime);
///Dimmension reduction components
/** \brief Validate pca parameters
*
* \param bool dimension or dispersion
* \param double dimmension or dispersion part
* \param int predictive calulus time
* \return void
*
*/
void pca(bool projType, double d, int maxCalcTime);
/** \brief Validate smacofMds parameters
*
* \param int dimmension
* \param int number of maximum iterations
* \param double difference between two susequent errors
* \param bool apply Zeidel modification
* \param int no of processors to use
* \param int predictive calulus time
* \return void
*
*/
void smacofMds(int d, int maxIteration, double eps, bool zeidel, int p, int maxCalcTime);
/** \brief Validate dma parameters
*
* \param int dimmension of the projection
* \param int max number of iterations
* \param double difference between two subsequent iterations
* \param double relative number of neighbours
* \param int predictive calulus time
* \return void
*
*/
void dma(int d, int maxIteration, double eps, double neighbour, int maxCalcTime);
/** \brief Validate relMds parameters
*
* \param int dimmension of the projection
* \param int max number of iterations
* \param double difference between two subsequent iterations
* \param double relative number of base vectors
* \param int (0 - random, 1 - PCA (1 dimmension), 2 - according to highest dispersion)
* \param int predictive calulus time
* \return void
*
*/
void relMds(int d, int maxIteration, double eps, double noOfBaseVectors, int selStrategy, int maxCalcTime);
/** \brief Validate samann parameters
*
* \param in dimmension of the projection
* \param int max number of iterations
* \param double relative size of raining set
* \param int neurons in hidden layer
* \param double learning rate
* \param int predictive calulus time
* \return void
*
*/
void samann(int d, int maxIteration, double mTrain, int nNeurons, double eta, int p, int maxCalcTime);
/** \brief Validate somMds parameters
*
* \param int number of rows of the resulting matrix
* \param int number of columns of resulting matix
* \param int number of MDS iterations
* \param double difference between two subsequent iterations
* \param int MDS projection dimmension
* \param int predictive calulus time
* \return void
*
*/
void somMds(int rows, int columns, int eHat, int mdsIteration, int mdsProjection, double eps, int maxCalcTime);
///Classification, grouping components
/** \brief Validate som parameters
*
* \param int number of rows
* \param int number of columns
* \param int number of learning epoch
* \param int number of processors that will be used
* \param int predictive calulus time
* \return void
*
*/
void som(int rows, int columns, int eHat, int p, int maxCalcTime);
/** \brief Validate mlp parameters
*
* \param int number of neurons in first hidden layer
* \param int number of neurons in second hidden layer
* \param double number of folds
* \param bool if true then cross validation if false then k fold validation
* \param int number of processors that will be used
* \param int number of maximum iterations
* \param int predictive calulus time
* \return void
*
*/
void mlp(int h1pNo, int h2pNo, double qty, bool validationMethod, int p, int maxIteration, int maxCalcTime);
/** \brief Validate decision forest
*
* \param double noise level the bigger the lower noise is
* \param double relative quantity of the learning objects
* \param double relative quantity of the testing objects
* \param int predictive calulus time
* \return void
*
*/
void decForest(double r, double dL, double dT, int maxCalcTime);
/** \brief Validate kMeans parameters
*
* \param int number of max iterations
* \param int number of clusters
* \param int predictive calulus time
* \return void
*
*/
void kMeans(int maxIteration, int kMax, int maxCalcTime);
private:
InitDamisService *inFile; /**< Hods reference to arff file */
bool methodParamsValid; /**< Indicates if the parameters are valid */
/** \brief Validates if the value is in interval
*
* \param double value
* \param double lbound
* \param double ubound
* \param std::string value to be printed in log file
* \param bool lbound = true inclusive
* \param bool ubound = true inclusive
* \return bool satisfies condition
*
*/
bool validateInterval(double val, double lBound, double uBound, std::string printVal, bool lowerInclusive = true, bool upperInclusive = true);
/** \brief Validates if value is greather than
*
* \param double value
* \param double lbound
* \param std::string value to be printed in log file
* \param bool lbound = true inclusive
* \param bool inverse = false condition
* \return bool satisfies condition
*
*/
bool validateGreatherThan(double val, double lBound, std::string printVal, bool lowerInclusive = true, bool inverse = false);
};
#endif //!defined(VALIDATEPARAMS_H)