(build-jd-rbm visible hidden classes)
Factory function to build a joint density RBM for testing purposes.
This RBM has two sets of visible units - the typical set representing each observation in the data set, and a softmax unit representing the label for each observation. These are combined, and the label becaomes part of the input vector.
Factory function to build a joint density RBM for testing purposes. This RBM has two sets of visible units - the typical set representing each observation in the data set, and a softmax unit representing the label for each observation. These are combined, and the label becaomes part of the input vector.
(build-rbm visible hidden)
Factory function to produce an RBM record.
Factory function to produce an RBM record.
(check-overfitting rbm train-sample validations)
Given an rbm, a sample from the training set, and a validation set, determine if the model is starting to overfit the data. This is measured by a difference in the average free energy over the training set sample and the validation set.
Given an rbm, a sample from the training set, and a validation set, determine if the model is starting to overfit the data. This is measured by a difference in the average free energy over the training set sample and the validation set.
(edn->CRBM data)
The default map->RBM function provided by the defrecord doesn't provide us with the performant implementation (i.e. matrices and arrays from core.matrix), so this function adds a small step to ensure that.
The default map->RBM function provided by the defrecord doesn't provide us with the performant implementation (i.e. matrices and arrays from core.matrix), so this function adds a small step to ensure that.
(edn->RBM data)
The default map->RBM function provided by the defrecord doesn't provide us with the performant implementation (i.e. matrices and arrays from core.matrix), so this function adds a small step to ensure that.
The default map->RBM function provided by the defrecord doesn't provide us with the performant implementation (i.e. matrices and arrays from core.matrix), so this function adds a small step to ensure that.
(free-energy x rbm)
Compute the free energy of a given visible vector and RBM. Lower is better.
Compute the free energy of a given visible vector and RBM. Lower is better.
(get-prediction x rbm num-classes labeled?)
For a given observation and RBM, return the predicted class.
For a given observation and RBM, return the predicted class.
(select-overfitting-sets dataset)
Given a dataset, attempt to choose reasonable validation and test sets to monitor overfitting.
Given a dataset, attempt to choose reasonable validation and test sets to monitor overfitting.
(test-rbm rbm dataset num-classes)
Test a joint density RBM trained on a data set. Returns an error percentage.
dataset should have the label as the last entry in each observation.
Test a joint density RBM trained on a data set. Returns an error percentage. dataset should have the label as the last entry in each observation.
(train-epoch rbm dataset learning-rate momentum batch-size)
Train a single epoch
Train a single epoch
(train-rbm rbm dataset params)
Given a training set, train an RBM
params is a map with various options:
learning-rate: defaults to 0.1
initial-momentum: starting momentum. Defaults to 0.5
momentum: momentum after momentum-delay
epochs have passed. Defaults to 0.9
momentum-delay: epochs after which momentum
is used instead of
initial-momentum
. Defaults to 3
batch-size: size of each mini-batch. Defaults to 10
epochs: number of times to train the model over the entire training set.
Defaults to 100
gap-delay: number of epochs elapsed before early stopping is considered
gap-stop-delay: number of sequential epochs where energy gap is increasing
before stopping
Given a training set, train an RBM params is a map with various options: learning-rate: defaults to 0.1 initial-momentum: starting momentum. Defaults to 0.5 momentum: momentum after `momentum-delay` epochs have passed. Defaults to 0.9 momentum-delay: epochs after which `momentum` is used instead of `initial-momentum`. Defaults to 3 batch-size: size of each mini-batch. Defaults to 10 epochs: number of times to train the model over the entire training set. Defaults to 100 gap-delay: number of epochs elapsed before early stopping is considered gap-stop-delay: number of sequential epochs where energy gap is increasing before stopping
(update-rbm batch rbm learning-rate momentum)
Single batch step update of RBM parameters
Single batch step update of RBM parameters
(update-weights ph ph2 batch pv)
Determine the weight gradient from this batch
Determine the weight gradient from this batch
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close