'Tuning hidden layer and neurons using neuralnet package

I am currently training ANN with single hidden layer. I want to adjust the amount of neuron inside the model using the code below (adapted from http://uc-r.github.io/ann_regression)

NN_FLUX1 <- neuralnet(formula = CO2_Flux ~ .,
                        data=trainSet_flux,
                        hidden=c(1:30),   # number of vertices (neurons) in each hidden layer
                        algorithm = "rprop+",   # resilient backprop with weight backtracking,
                        err.fct = "sse",       
                        act.fct = "tanh", 
                        threshold = 0.05,       
                        linear.output=FALSE,
                        rep = 30)     

I want to confirm

hidden = c(1:30)

is that means the neuralnet will perform the grid search from one to 30 neurons to find the best ANN models ? am I wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source