33 #ifndef GRT_BERNOULLI_RBM_HEADER
34 #define GRT_BERNOULLI_RBM_HEADER
36 #include "../../Util/GRTTypedefs.h"
37 #include "../../DataStructures/MatrixFloat.h"
38 #include "../../CoreModules/MLBase.h"
45 BernoulliRBM(
const UINT numHiddenUnits = 100,
const UINT maxNumEpochs = 1000,
const Float learningRate = 1,
const Float learningRateUpdate = 1,
const Float momentum = 0.5,
const bool useScaling =
true,
const bool randomiseTrainingOrder =
true);
103 virtual bool clear();
123 virtual bool print()
const;
125 bool getRandomizeWeightsForTraining()
const;
126 UINT getNumVisibleUnits()
const;
127 UINT getNumHiddenUnits()
const;
131 bool setNumHiddenUnits(
const UINT numHiddenUnits);
132 bool setMomentum(
const Float momentum);
133 bool setLearningRateUpdate(
const Float learningRateUpdate);
134 bool setRandomizeWeightsForTraining(
const bool randomizeWeightsForTraining);
135 bool setBatchSize(
const UINT batchSize);
136 bool setBatchStepSize(
const UINT batchStepSize);
149 inline Float sigmoidRandom(
const Float &x){
153 bool randomizeWeightsForTraining;
154 UINT numVisibleUnits;
159 Float learningRateUpdate;
184 #endif //GRT_BERNOULLI_RBM_HEADER
virtual bool predict(VectorFloat inputVector)
virtual bool predict_(VectorFloat &inputVector)
virtual bool loadModelFromFile(std::fstream &file)
bool predict_(VectorFloat &inputData)
virtual bool train(ClassificationData trainingData)
virtual bool saveModelToFile(std::string filename) const
bool loadLegacyModelFromFile(std::fstream &file)
virtual bool loadModelFromFile(std::string filename)
virtual bool print() const
virtual bool train_(ClassificationData &trainingData)
Float getRandomNumberUniform(Float minRange=0.0, Float maxRange=1.0)
virtual bool saveModelToFile(std::fstream &file) const
virtual bool train_(MatrixFloat &data)