|
| RBM (int D, int H, int cdN=1, double stdDev=0.01, bool backprop=true, Regularization regularization=Regularization()) |
| Construct RBM. More...
|
|
virtual | ~RBM () |
|
virtual Eigen::VectorXd | operator() (const Eigen::VectorXd &x) |
| Make a prediction. More...
|
|
virtual Eigen::MatrixXd | operator() (const Eigen::MatrixXd &X) |
| Make predictions. More...
|
|
virtual bool | providesInitialization () |
| Check if the object knows how to initialize its parameters. More...
|
|
virtual void | initialize () |
| Initialize the optimizable parameters. More...
|
|
virtual unsigned int | examples () |
| Request number of training examples. More...
|
|
virtual unsigned int | dimension () |
| Request the number of optimizable parameters. More...
|
|
virtual void | setParameters (const Eigen::VectorXd ¶meters) |
| Set new parameters. More...
|
|
virtual const Eigen::VectorXd & | currentParameters () |
| Request the current parameters. More...
|
|
virtual double | error () |
| Compute error on training set. More...
|
|
virtual double | error (unsigned int n) |
|
virtual bool | providesGradient () |
| Check if the object provides a gradient of the error function with respect to its parameters. More...
|
|
virtual Eigen::VectorXd | gradient () |
| Compute gradient of the error function with respect to the parameters. More...
|
|
virtual Eigen::VectorXd | gradient (unsigned int n) |
|
virtual void | errorGradient (std::vector< int >::const_iterator startN, std::vector< int >::const_iterator endN, double &value, Eigen::VectorXd &grad) |
| Calculates the accumulated gradient and error of given training examples. More...
|
|
virtual void | forwardPropagate (Eigen::MatrixXd *x, Eigen::MatrixXd *&y, bool dropout, double *error=0) |
| Forward propagation in this layer. More...
|
|
virtual void | backpropagate (Eigen::MatrixXd *ein, Eigen::MatrixXd *&eout, bool backpropToPrevious) |
| Backpropagation in this layer. More...
|
|
virtual Eigen::MatrixXd & | getOutput () |
| Output after last forward propagation. More...
|
|
virtual Eigen::VectorXd | getParameters () |
| Get the current values of parameters (weights, biases, ...). More...
|
|
virtual OutputInfo | initialize (std::vector< double * > ¶meterPointers, std::vector< double * > ¶meterDerivativePointers) |
| Fill in the parameter pointers and parameter derivative pointers. More...
|
|
virtual void | initializeParameters () |
| Initialize the parameters. More...
|
|
virtual void | updatedParameters () |
| Generate internal parameters from externally visible parameters. More...
|
|
int | visibleUnits () |
| Get number of visible units. More...
|
|
int | hiddenUnits () |
| Get number of hidden units. More...
|
|
const Eigen::MatrixXd & | getWeights () |
| Get the current weight matrix. More...
|
|
const Eigen::MatrixXd & | getVisibleProbs () |
| Get probabilities of visible units. More...
|
|
const Eigen::MatrixXd & | getVisibleSample () |
| Get sample from the distribution of the visible units. More...
|
|
Eigen::MatrixXd | reconstructProb (int n, int steps) |
| Get the probability of the n-th training example after some sampling steps. More...
|
|
void | sampleHgivenV () |
| Sample hidden units given visible units. More...
|
|
void | sampleVgivenH () |
| Sample visible units given hidden units. More...
|
|
| Learner () |
|
virtual | ~Learner () |
|
virtual Learner & | trainingSet (Eigen::MatrixXd &input, Eigen::MatrixXd &output) |
| Set training set. More...
|
|
virtual Learner & | trainingSet (DataSet &trainingSet) |
| Set training set. More...
|
|
virtual Learner & | removeTrainingSet () |
| Remove the training set from the learner. More...
|
|
virtual Learner & | validationSet (Eigen::MatrixXd &input, Eigen::MatrixXd &output) |
| Set validation set. More...
|
|
virtual Learner & | validationSet (DataSet &validationSet) |
| Set validation set. More...
|
|
virtual Learner & | removeValidationSet () |
| Remove the validation set from the learner. More...
|
|
virtual | ~Optimizable () |
|
virtual void | finishedIteration () |
| This callback is called after each optimization algorithm iteration. More...
|
|
virtual double | error (unsigned n) |
| Compute error of a given training example. More...
|
|
virtual Eigen::VectorXd | gradient (unsigned n) |
| Compute gradient of a given training example. More...
|
|
virtual void | errorGradient (int n, double &value, Eigen::VectorXd &grad) |
| Calculates the function value and gradient of a training example. More...
|
|
virtual void | errorGradient (double &value, Eigen::VectorXd &grad) |
| Calculates the function value and gradient of all training examples. More...
|
|
virtual Eigen::VectorXd | error (std::vector< int >::const_iterator startN, std::vector< int >::const_iterator endN) |
| Calculates the errors of given training examples. More...
|
|
virtual Eigen::VectorXd | gradient (std::vector< int >::const_iterator startN, std::vector< int >::const_iterator endN) |
| Calculates the accumulated gradient of given training examples. More...
|
|
virtual | ~Layer () |
|
Restricted Boltzmann Machine.
RBMs have been originally invented by Paul Smolensky in 1986 [1] and since contrastive divergence [2] can be used to calculate an approximation of a gradient, we can efficiently train RBMs. RBMs are usually used to learn features unsupervised. However, they can be stacked and we can use them to initialize deep autoencoders for dimensionality reduction or feedforward networks for classification. Standard RBMs assume that the data is binary (at least approximately, i.e. the values have to be within [0, 1]).
Deep networks are usually difficult to train because the required learning rate in the first layer is usually much higher than in the upper layers. This problem can be solved by initializing the first layers with RBMs, which was the major breakthrouh in deep learning. There are also other ways to make deep learning work, e.g. CNNs (weight sharing), ReLUs, maxout, etc.
Supports the following regularization types:
[1] Smolensky, Paul: Information Processing in Dynamical Systems: Foundations of Harmony Theory, MIT Press, 1986, pp. 194-281.
[2] Hinton, Geoffrey E.: Training Products of Experts by Minimizing Contrastive Divergence, Technical Report, University College London, 2000.