-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMLP.h
More file actions
79 lines (71 loc) · 2.49 KB
/
MLP.h
File metadata and controls
79 lines (71 loc) · 2.49 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
#ifndef MLP_H
#define MLP_H
#include "ClusterizationMethods.h"
/*! \file MLP class
\brief A class of methods and attributes for multilayer perceptron algorithm.
*/
class MLP : public ClusterizationMethods
{
public:
/*! \fn MLP();
* \brief A default constructor.
*/
MLP();
/*! \fn MLP(int h1pNo, int h2pNo, double qtty, int maxIter, bool validationMethod);
* \brief An overloaded constructor.
* \param double h1pNo - number of neurons in first layer.
* \param double h2No - number of neurons in second layer
* \param double qtty - either kfold validation or percentage for testing
* \param in maxIter - number of mafimum iteration
* \param bool validationMEthod - kfold or corss validation.
*/
MLP(int h1pNo, int h2pNo, double qtty, int maxIter, bool validationMethod);
/*! \fn virtual ~MLP();
* \brief A destructor.
*/
virtual ~MLP();
/*! \fn virtual ObjectMatrix getProjection();
* \brief Returns the projection matrix \a Y of matrix \a X.
* \return ObjectMatrix Y - the projection matrix.
*/
virtual ObjectMatrix getProjection();
/*! \fn double getStress();
* \brief Returns the projection matrix \a Y of matrix \a X.
* \return double - average relative error.
*/
double getStress();
private:
/*! \var int h1No;
* \brief Number of neurons in first hidden layer
*/
int h1No;
/*! \var int h2No;
* \brief Number of neurons in first hidden layer
*/
int h2No;
/*! \var int maxIter;
* \brief Number of iterations
*/
int maxIter;
/*! \var bool kFoldValidation;
* \brief Indicates if perform k-fold validation
*/
bool kFoldValidation;
/*! \var alglib::mlptrainer trn;
* \brief Algrlib structure used of MLP training
*/
alglib::mlptrainer trn;
/*! \var alglib::multilayerperceptron network;
* \brief Alglib structure that describe the network
*/
alglib::multilayerperceptron network;
/*! \var alglib::mlpreport rep;
* \brief Algrlib structure that holds MLP reports
*/
alglib::mlpreport rep;
/*! \var alglib::modelerrors repp;
* \brief Algrlib structure that holds network model reports
*/
alglib::modelerrors repp;
};
#endif // MLP_H