Description Usage Arguments Value Examples
Computes the reconstruction error (rmse) of the prediction of the data. rmse
is an alias for error
. errorSum
sum the error over the data points.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | error(...)
rmse(...)
errorSum(...)
## S3 method for class 'DeepBeliefNet'
error(x, data, ...)
## S3 method for class 'DeepBeliefNet'
rmse(x, data, ...)
## S3 method for class 'DeepBeliefNet'
errorSum(x, data, ...)
## S3 method for class 'RestrictedBolzmannMachine'
error(x, data, ...)
## S3 method for class 'RestrictedBolzmannMachine'
rmse(x, data, ...)
## S3 method for class 'RestrictedBolzmannMachine'
errorSum(x, data, ...)
|
... |
further arguments to the |
x |
the |
data |
feature vector |
the reconstruction error of the data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(mnist)
data(mnist)
data(trained.mnist)
# Calculate (reconstruction) error per data point
err <- error(trained.mnist, mnist$test$x)
length(err) # 1 value per data point
# error and rmse are synonymous
identical(err, rmse(trained.mnist, mnist$test$x))
# errorSum returns the sum
sum <- errorSum(trained.mnist, mnist$test$x)
print(sum)
all.equal(sum, sum(err))
# There may be some rounding errors though, so this might not be ==:
sum == sum(err)
# On a RestrictedBolzmannMachine
data(pretrained.mnist)
rbm <- pretrained.mnist[[1]]
errorSum(rbm, mnist$test$x)
err <- error(rbm, mnist$test$x)
identical(err, rmse(rbm, mnist$test$x))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.