33 #ifndef GRT_MLP_HEADER
34 #define GRT_MLP_HEADER
37 #include "../../../CoreModules/Regressifier.h"
107 virtual bool clear();
114 virtual bool print()
const;
158 bool init(
const UINT numInputNeurons,
const UINT numHiddenNeurons,
const UINT numOutputNeurons);
177 bool init(
const UINT numInputNeurons,
const UINT numHiddenNeurons,
const UINT numOutputNeurons,
const UINT inputLayerActivationFunction,
178 const UINT hiddenLayerActivationFunction,
const UINT outputLayerActivationFunction);
492 bool inline isNAN(
const Float v)
const;
500 bool loadLegacyModelFromFile( std::fstream &file );
531 UINT numInputNeurons;
532 UINT numHiddenNeurons;
533 UINT numOutputNeurons;
534 UINT inputLayerActivationFunction;
535 UINT hiddenLayerActivationFunction;
536 UINT outputLayerActivationFunction;
537 UINT numRandomTrainingIterations;
551 bool classificationModeActive;
552 bool useNullRejection;
553 UINT predictedClassLabel;
554 Float nullRejectionThreshold;
555 Float nullRejectionCoeff;
569 enum TrainingModes{ONLINE_GRADIENT_DESCENT};
575 #endif //GRT_MLP_HEADER
UINT getNumHiddenNeurons() const
virtual bool predict(VectorFloat inputVector)
MLP & operator=(const MLP &rhs)
VectorFloat feedforward(VectorFloat data)
VectorFloat getClassDistances() const
bool setTrainingRate(const Float trainingRate)
This class implements a Neuron that is used by the Multilayer Perceptron.
virtual bool predict_(VectorFloat &inputVector)
bool getNullRejectionEnabled() const
bool validateActivationFunction(const UINT avactivationFunction) const
Float back_prop(const VectorFloat &inputVector, const VectorFloat &targetVector, const Float alpha, const Float beta)
virtual bool train(ClassificationData trainingData)
UINT getInputLayerActivationFunction() const
Vector< Neuron > getHiddenLayer() const
bool init(const UINT numInputNeurons, const UINT numHiddenNeurons, const UINT numOutputNeurons)
std::string activationFunctionToString(const UINT activationFunction) const
Vector< VectorFloat > getTrainingLog() const
UINT getNumRandomTrainingIterations() const
virtual bool train_(ClassificationData &trainingData)
bool setInputLayerActivationFunction(const UINT activationFunction)
Vector< Neuron > getOutputLayer() const
bool setHiddenLayerActivationFunction(const UINT activationFunction)
virtual bool saveModelToFile(std::string filename) const
virtual bool saveModelToFile(std::fstream &file) const
Vector< Neuron > getInputLayer() const
UINT getNumOutputNeurons() const
void printNetwork() const
UINT activationFunctionFromString(const std::string activationName) const
Float getMomentum() const
virtual bool print() const
bool setNullRejection(const bool useNullRejection)
VectorFloat getClassLikelihoods() const
virtual bool loadModelFromFile(std::string filename)
UINT getOutputLayerActivationFunction() const
bool setMomentum(const Float momentum)
Float getTrainingError() const
Float getMaximumLikelihood() const
virtual bool train_(ClassificationData &trainingData)
UINT getHiddenLayerActivationFunction() const
Float getNullRejectionCoeff() const
virtual bool deepCopyFrom(const Regressifier *regressifier)
bool setNumRandomTrainingIterations(const UINT numRandomTrainingIterations)
bool setGamma(const Float gamma)
UINT getNumClasses() const
Float getNullRejectionThreshold() const
virtual bool loadModelFromFile(std::fstream &file)
bool setNullRejectionCoeff(const Float nullRejectionCoeff)
bool getRegressionModeActive() const
Float getTrainingRate() const
bool setOutputLayerActivationFunction(const UINT activationFunction)
UINT getPredictedClassLabel() const
bool getClassificationModeActive() const
virtual bool predict_(VectorFloat &inputVector)
UINT getNumInputNeurons() const