I just started to study the "deepnet" package: http://cran.r-project.org/web/packages/deepnet/index.html
It is about "deep leaning", so about the usage of multi-layer neural networks. I've started to use the train() functions available in the package, but I really cannot understand how to add more hidden layers in the neural networks. The standard setting includes 2 hidden layers, but I would like to add more, like 5. Does some of you have an idea?
I am using the sae.dnn.train() function but I cannot understand which parameter controls the number of hidden layers. Here's the example code:
Var1 <- c(rnorm(50, 1, 0.5), rnorm(50, -0.6, 0.2))
Var2 <- c(rnorm(50, -0.8, 0.2), rnorm(50, 2, 1))
x <- matrix(c(Var1, Var2), nrow = 100, ncol = 2)
y <- c(rep(1, 50), rep(0, 50))
dnn <- sae.dnn.train(x, y, hidden = c(5, 5))
## predict by dnn
test_Var1 <- c(rnorm(50, 1, 0.5), rnorm(50, -0.6, 0.2))
test_Var2 <- c(rnorm(50, -0.8, 0.2), rnorm(50, 2, 1))
test_x <- matrix(c(test_Var1, test_Var2), nrow = 100, ncol = 2)
nn.test(dnn, test_x, y)
Which parameter sets the number of hidden layers in the neural network? How to add more hidden layers?
h2o
is really fast w/ high usability and you can try it. – Patric