ds.monitored_fitrbm: Fit an RBM model

Description Usage Arguments Details

View source: R/main.R

Description

Fits an RBM model using Stochastic Gradient Descent (SGD) on the data with Contrastive Divergence (CD). During the training, monitoring data is collected by default. The monitoring data is returned to the user. The trained model is stored on the server side (see parameter newobj).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
ds.monitored_fitrbm(
  datasources,
  data = "D",
  newobj = "rbm",
  monitoring = "reconstructionerror",
  monitoringdata = NULL,
  nhidden = NULL,
  epochs = NULL,
  upfactor = NULL,
  downfactor = NULL,
  learningrate = NULL,
  learningrates = NULL,
  pcd = NULL,
  cdsteps = NULL,
  categories = NULL,
  batchsize = NULL,
  rbmtype = NULL,
  startrbm = NULL
)

Arguments

datasources

A list of Opal object(s) as a handle to the server-side session

data

The name of the variable that holds the training data on the server-side. Defaults to "D".

newobj

The name for the variable in which the trained RBM will be stored. Defaults to "rbm".

monitoring

Name(s) for monitoring options used for RBM training. Possible options:

  • "reconstructionerror": Calculates the reconstruction error (Default)

  • "loglikelihood": Estimates the loglikelihood via annealed importance sampling (AIS)

  • "exactloglikelihood": Exact calculation of log-likelihood. This is only feasible for very small models.

  • NULL: No monitoring

monitoringdata

A vector of names for server-side data sets that are to be used for monitoring

nhidden

The number of hidden units of the returned RBM

epochs

The number of training epochs

upfactor

If this function is used for pretraining a part of a DBM, it is necessary to multiply the input from the visible layer of the RBM with a factor.

downfactor

If this function is used for pretraining a part of a DBM, it is necessary to multiply the input from the hidden layer of the RBM with a factor.

learningrate

The learning rate for the weights and biases can be specified as a single value, used throughout all epochs. Defaults to 0.005.

learningrates

The learning rate for the weights and biases can also be specified as a vector that contains a value for each epoch.

pcd

Indicating whether Persistent Contrastive Divergence (PCD) is to be used (TRUE, default) or simple CD that initializes the Gibbs chain with the training sample (FALSE)

cdsteps

The number of Gibbs sampling steps for (persistent) contrastive divergence. Defaults to 1.

categories

Only relevant if rbmtype is "Softmax0BernoulliRBM". The number of categories, if all variables have the same number of categories, or a vector that contains the number of categories for the i'th categorical variable in the i'th entry.

batchsize

The number of samples that are used for making one step in the stochastic gradient descent optimizer algorithm. Default is 1.

rbmtype

The type of the RBM that is to be trained. This must be a subtype of AbstractRBM. Defaults to BernoulliRBM.

startrbm

A name for an RBM object at the server side that is used as starting value for training. If this argument is specified, nhidden and rbmtype are ignored.

Details

If the option dsBoltzmannMachines.shareModels is set to TRUE by an administrator at the server side, the models themselves are returned in addition.


stefan-m-lenz/dsBoltzmannMachinesClient documentation built on May 2, 2021, 10:46 a.m.