Liking cljdoc? Tell your friends :D

deebn.rbm


build-jd-rbmclj

(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.
sourceraw docstring

build-rbmclj

(build-rbm visible hidden)

Factory function to produce an RBM record.

Factory function to produce an RBM record.
sourceraw docstring

check-overfittingclj

(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.
sourceraw docstring

edn->CRBMclj

(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.
sourceraw docstring

edn->RBMclj

(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.
sourceraw docstring

free-energyclj

(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.
sourceraw docstring

get-predictionclj

(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.
sourceraw docstring

load-rbmclj

(load-rbm filepath)

Load a RBM from disk.

Load a RBM from disk.
sourceraw docstring

save-rbmclj

(save-rbm rbm filepath)

Save a RBM to disk.

Save a RBM to disk.
sourceraw docstring

select-overfitting-setsclj

(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.
sourceraw docstring

test-rbmclj

(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.
sourceraw docstring

train-epochclj

(train-epoch rbm dataset learning-rate momentum batch-size)

Train a single epoch

Train a single epoch
sourceraw docstring

train-rbmclj

(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
sourceraw docstring

update-rbmclj

(update-rbm batch rbm learning-rate momentum)

Single batch step update of RBM parameters

Single batch step update of RBM parameters
sourceraw docstring

update-weightsclj

(update-weights ph ph2 batch pv)

Determine the weight gradient from this batch

Determine the weight gradient from this batch
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close