Description Usage Arguments Value
Trains an RFN as described by Clevert et al., 2014
1 2 3 4 5 6 | train_rfn(X, n_hidden, n_iter, etaW, etaP, minP, batch_size = -1,
dropout_rate = 0, input_noise_rate = 0, l2_weightdecay = 0,
l1_weightdecay = 0, h_threshold = 0, momentum = 0,
noise_type = "saltpepper", activation = "relu", apply_scaling = 1,
apply_newton_update = 1, seed = -1, use_gpu = 0, gpu_id = -1,
verbose = T)
|
X |
The data matrix |
n_hidden |
Number of latent variables to estimate |
n_iter |
Number of iterations to run the algorithm |
etaW |
Learning rate of the W parameter |
etaP |
Learning rate of the Psi parameter (It's probably save to set this to the same value as etaW) |
minP |
Minimal value for Psi. Should be in 1e-5 - 1e-1 |
batch_size |
If > 2, this will activate mini-batch learning instead of full batch learning |
dropout_rate |
Dropout rate for the latent variables |
input_noise_rate |
Noise/dropout rate for input variables |
l2_weightdecay |
L2 penalty for weight decay |
l1_weightdecay |
L1 penalty for weight decay |
h_threshold |
Threshhold for rectifying/leaky activations |
momentum |
Momentum term for learning |
noise_type |
Type of input noise. One of "dropout", "saltpepper", "gaussian" |
activation |
Activation function for hidden/latent variables. One of "linear", "relu", "leaky", "sigmoid", "tanh" |
apply_scaling |
Scale the data |
apply_newton_update |
Whether to use a Newton update (default) or a gradient descent step |
seed |
Seed for the random number generator |
use_gpu |
Use the gpu (default cpu). Works only for sparse input. |
gpu_id |
If use_gpu is true, use gpu with this id (default -1 selects one available) |
verbose |
True to print messages during the run. Default is True. |
Returns a list of matrices W
, P
, H
,
Wout
, whereas W %*% H
is the noise-free reconstruction
of the data X
and diag(P)
is the covariance matrix
of the additive zero-mean noise. Wout
is the matrix that
maps input vectors to their latent representation, usually by
pmax(t(Wout) %*% X, 0)
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.