Description Usage Arguments Value References Examples
Welling et al. (2005)'s Exponential Family Harmoniums
1 2 3 4 5 |
x |
matrix of either binary, count, or continuous data |
k |
dimension (number of hidden units) |
family |
exponential family distribution of data |
family_hidden |
exponential family distribution of hidden units |
cd_iters |
number of iterations for contrastive divergence (CD) at each iteration. It should be a vector of two integers, which is the range of CD interations that the algorithm will perform from the beginning until the end, linearly interpolated |
learning_rate |
learning rate used for gradient descent |
max_iters |
maximum number of iterations |
rms_prop |
logical; whether to use RMS prop for optimization. Default is |
quiet |
logical; whether the calculation should give feedback |
random_start |
whether to randomly initialize |
start_W |
initial value for |
mu |
specific value for |
main_effects |
logical; whether to include main effects (bias terms) in the model |
An S3 object of class efh
which is a list with the
following components:
mu |
the main effects (bias terms) for dimensionality reduction |
hidden_bias |
the bias for the hidden units (currently hard coded to 0) |
W |
the |
family |
the exponential family of the data |
family_hidden |
the exponential family of the hidden units |
iters |
number of iterations required for convergence |
loss_trace |
the trace of the average deviance of the algorithm. Should be non-increasing |
prop_deviance_expl |
the proportion of deviance explained by this model.
If |
Welling, Max, Michal Rosen-Zvi, and Geoffrey E. Hinton. "Exponential family harmoniums with an application to information retrieval." Advances in neural information processing systems. 2005.
1 2 3 4 5 6 7 8 9 10 11 12 | rows = 100
cols = 10
set.seed(1)
mat_np = outer(rnorm(rows), rnorm(cols))
# generate a count matrix and binary response
mat = matrix(rpois(rows * cols, c(exp(mat_np))), rows, cols)
mat[1, 1] <- NA
modp = exponential_family_harmonium(mat, k = 2, family = "poisson", quiet = FALSE,
learning_rate = 0.001, rms_prop = FALSE, max_iters = 250)
gmf = generalizedMF(mat, k = 1, family = "poisson", quiet = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.