Description Usage Arguments Value Examples
Computes the energy of the data points in the DeepBeliefNet or RestrictedBolzmannMachine
1 2 3 4 5 6 7 |
x |
the |
data |
the dataset, either as matrix or data.frame. The number of columns must match the number of nodes of the network input |
... |
ignored |
drop |
do not return additional dimensions |
a vector or matrix of the same size than the data (rows) giving the energy of each data point
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(mnist)
data(mnist)
# Calculate error per data point on RBM
data(pretrained.mnist)
rbm <- pretrained.mnist[[1]]
en <- energy(rbm, mnist$test$x)
head(en) # 1 value per data point
# Calculate error per data point on DBN
data(trained.mnist)
en <- energy(trained.mnist, mnist$test$x)
head(en) # 1 value per data point
# Energy is not related with reconstruction error
err <- error(trained.mnist, mnist$test$x)
## Not run: plot.mnist(predictions = cbind(err, en))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.