Error encountered while using AMORE package. "Error in train.method(net, P, T, show.step)...."
0
0
Entering edit mode
Suyog Pol ▴ 40
@suyog-pol-3909
Last seen 10.3 years ago
Hi I was exploring the AMORE package, to check if I can implement and train networks with customised architectures. I am basically training a network which has 2 inputs, 2 neurons in the hidden layer and 2 output neurons. I aim to remove the connection between a neuron from the hidden layer and a neuron in the output layer. I am using the following code :- #initialising of the network net.custom <- newff(n.neurons=c(2,2,2), learning.rate.global=1e-2, momentum.global=0.5, error.criterium="LMS", Stao=NA, hidden.layer="tansig", output.layer="purelin", method="ADAPTgdwm") #Remodeling of the network to remove connection between neuron[1] and neuron [4] net.custom$neurons[[1]]$output.links <- c(3) net.custom$neurons[[1]]$output.aims <- c(1) net.custom$neurons[[4]]$weights <- net.sofm$neurons[[4]]$weights[1] net.custom$neurons[[4]]$input.links <- c(2) net.custom$neurons[[2]]$output.aims <- c(2,1) #Initializing matrices for training of the network P <- matrix(c(c(1,2,3,4),c(1,2,3,4)),nrow = 4, ncol=2) target <- P #Just to keep things simple for now. # We train the network according to P and target. result <- train(net.sofm, P, target, error.criterium="LMS", report=TRUE, show.step=100, n.shows=5 ) ## Running the above line gives me the following error Error in train.method(net, P, T, show.step) : INTEGER() can only be applied to a 'integer', not a 'double' I was unable to fix the error by using P <- as.interger (martix(....)). Apart from this we could not think of any other method to fix this problem. The sessionInfo is as follows :- R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] AMORE_0.2-12 > I wonder changing the values of ouput.links, input.links etc is sufficient for changing the connections between the neurons. Is there any other package in R which allows me to design and train neural network. Thank You Suyog P -- Masters Student Department of Chemical and Biological Eng, University at Buffalo, Buffalo, NY . Ph: 801 814 3893 [[alternative HTML version deleted]]
Network Network • 1.0k views
ADD COMMENT

Login before adding your answer.

Traffic: 726 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6