[R] Neural Network
Francis_Statistics
statistics_vi at hotmail.com
Fri Mar 5 10:13:09 CET 2010
Hi,
We are trying to implement a early stopping rule with validation set on a
neural network. We’re using the AMORE package
(http://rwiki.sciviews.org/doku.php?id=packages:cran:amore) of R and when
you train the network you have to specify following variables:
Pval
Tval
What do we have to put here, or how do we have to specify this values? We
are using simulated data from a sinc function.
This is the code that we are using.
#define a sinc function
sinc <- function(x) sin(pi*x)/(pi*x)
size_data = 200
# Generate data from sin function
ticks = linspace(-1,1,size_data)
sin_data = sinc(ticks)
# Generate noise
std_dev = 0.5
noise_data <- runif(size_data, 0, std_dev)
# Impose noise on sin data
dat = sin_data + noise_data
#Normalise data
max_dat = max(dat)
norm_dat = dat/max(dat)
#Define a neural network
net.start <- newff(n.neurons=c(1,20, 1),
learning.rate.global=1e-3,
momentum.global=0.5,
error.criterium="LMS",
Stao=NA, hidden.layer="tansig",
output.layer="purelin",
method="ADAPTgd")
#Train the network
result <- train(net.start, ticks, norm_dat, Pval= NULL, Tval=NULL,
error.criterium="LMS", report=FALSE, show.step=8000, n.shows=0)
Are there any tips you can give for a better neural network or a better
training of this net?
Thanks a lot,
A desperate team in search of help.
--
View this message in context: http://n4.nabble.com/Neural-Network-tp1579365p1579365.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list