How interpret or what's the meaning of rbm.up results?

I am studying deep learning and the deepnet R package gives me the following example: (rbm.up function Infer hidden units states by visible units)

library(deepnet)

Var1 - c(rep(1, 50), rep(0, 50))
Var2 - c(rep(0, 50), rep(1, 50))
x3 - matrix(c(Var1, Var2), nrow = 100, ncol = 2)
r1 - rbm.train(x3, 3, numepochs = 20, cd = 10)
v - c(0.2, 0.8)
h - rbm.up(r1, v)
h

The result:

          [,1]      [,2]      [,3]
[1,] 0.5617376 0.4385311 0.5875892

What do these results means?

Topic rbm recommender-system

Category Data Science


As the documentation mentions, it shows the hidden states of each of the nodes in the restricted Boltzmann machine after you have trained your model. The number of values you get from rbm.up is equal to the value for the hidden argument in rbm.train (the second value), which in your case is 3. If you increase this number you will see that the number of values you get from rbm.up also increases:

library(deepnet)

Var1 <- c(rep(1, 50), rep(0, 50))
Var2 <- c(rep(0, 50), rep(1, 50))
x3 <- matrix(c(Var1, Var2), nrow = 100, ncol = 2)
r1 <- rbm.train(x3, 5, numepochs = 20, cd = 10)
v <- c(0.2, 0.8)
h <- rbm.up(r1, v)
print(h)

#           [,1]      [,2]      [,3]      [,4]      [,5]
# [1,] 0.5826883 0.6624397 0.5545223 0.4133155 0.5533788

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.