[R] RSNNS neural network

jake88 youtube_b at telus.net
Tue Mar 1 07:35:45 CET 2016


I am new to R and neural networks . So I trained and predicted an elman
network like so : 

require ( RSNNS ) 
mydata = read.csv("mydata.csv",header = TRUE) 
mydata.train = mydata[1000:2000,] 
mydata.test = mydata[800:999,] 

fit <- elman ( mydata.train[,2:10],mydata.train[,1], size =100 
     learnFuncParams =c (0.1) , maxit =1000) 
pred <-predict (fit , mydata.test[,2:10]) 

So pred contains the predictions . 
The problem I am having is that when I run pred <-predict (fit ,
mydata.test[1,2:10]) repeatedly , it gives me different results each time .
Should not the weights and bias be set permanently in the network and give
the same result everytime   ?   



More information about the R-help mailing list