[R-SIG-Finance] Eman NN using RSNNS package
josh.m.ulrich at gmail.com
Fri Jun 12 15:24:23 CEST 2015
Please do not cross-post, or at least tell people that you are
cross-posting and link to the other places you've posted:
If someone does not follow all the sites you post to, they could spend
time answering your question that has already been answered on another
On Fri, Jun 12, 2015 at 6:26 AM, Abhay Bhadani <abhadani at gmail.com> wrote:
> Dear all,
> I am trying to use elman function in package RSNNS to train and test a
> neural network model for stock price prediction.
> Based on my limited understanding from the manual and a research article on
> RSNNS package, I interpret that the network can be trained using
> model <- elman(patterns$inputsTrain, patterns$targetsTrain,
> size = c(8, 8), learnFuncParams = c(0.1), maxit = 1000,
> inputsTest = patterns$inputsTest, targetsTest = patterns$targetsTest,
> linOut = FALSE)
> and the values for the new dataset can be obtained using prediction <-
> predict(model, newdataset).
> I am trying predict the future stock price using its past value as input (I
> am considering the univariate case). How do I go about the case of
> out-of-sample prediction? For instance, I have 400 data points. Suppose I
> train and test the model using 300 and 100 data points, respectively. Now
> how do I predict the 401th data point using elman function in RSNNS
> Your suggestions are much appreciated!
> [[alternative HTML version deleted]]
> R-SIG-Finance at r-project.org mailing list
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
More information about the R-SIG-Finance