Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

jordan

Create and train a Jordan network


Description

Jordan networks are partially recurrent networks and similar to Elman networks (see elman). Partially recurrent networks are useful when working with time series data. I.e., when the output of the network not only should depend on the current pattern, but also on the patterns presented before.

Usage

jordan(x, ...)

## Default S3 method:
jordan(x, y, size = c(5), maxit = 100,
  initFunc = "JE_Weights", initFuncParams = c(1, -1, 0.3, 1, 0.5),
  learnFunc = "JE_BP", learnFuncParams = c(0.2),
  updateFunc = "JE_Order", updateFuncParams = c(0),
  shufflePatterns = FALSE, linOut = TRUE, inputsTest = NULL,
  targetsTest = NULL, ...)

Arguments

x

a matrix with training inputs for the network

...

additional function parameters (currently not used)

y

the corresponding targets values

size

number of units in the hidden layer(s)

maxit

maximum of iterations to learn

initFunc

the initialization function to use

initFuncParams

the parameters for the initialization function

learnFunc

the learning function to use

learnFuncParams

the parameters for the learning function

updateFunc

the update function to use

updateFuncParams

the parameters for the update function

shufflePatterns

should the patterns be shuffled?

linOut

sets the activation function of the output units to linear or logistic

inputsTest

a matrix with inputs to test the network

targetsTest

the corresponding targets for the test input

Details

Learning on Jordan networks: Backpropagation algorithms for feed-forward networks can be adapted for their use with this type of networks. In SNNS, there exist adapted versions of several backpropagation-type algorithms for Jordan and Elman networks.

Network architecture: A Jordan network can be seen as a feed-forward network with additional context units in the input layer. These context units take input from themselves (direct feedback), and from the output units. The context units save the current state of the net. In a Jordan net, the number of context units and output units has to be the same.

Initialization of Jordan and Elman nets should be done with the default init function JE_Weights, which has five parameters. The first two parameters define an interval from which the forward connections are randomly chosen. The third parameter gives the self-excitation weights of the context units. The fourth parameter gives the weights of context units between them, and the fifth parameter gives the initial activation of context units.

Learning functions are JE_BP, JE_BP_Momentum, JE_Quickprop, and JE_Rprop, which are all adapted versions of their standard-procedure counterparts. Update functions that can be used are JE_Order and JE_Special.

A detailed description of the theory and the parameters is available, as always, from the SNNS documentation and the other referenced literature.

Value

an rsnns object.

References

Jordan, M. I. (1986), 'Serial Order: A Parallel, Distributed Processing Approach', Advances in Connectionist Theory Speech 121(ICS-8604), 471-495.

Zell, A. et al. (1998), 'SNNS Stuttgart Neural Network Simulator User Manual, Version 4.2', IPVR, University of Stuttgart and WSI, University of Tübingen. http://www.ra.cs.uni-tuebingen.de/SNNS/welcome.html

Zell, A. (1994), Simulation Neuronaler Netze, Addison-Wesley. (in German)

See Also

Examples

## Not run: demo(iris)
## Not run: demo(laser)
## Not run: demo(eight_elman)
## Not run: demo(eight_elmanSnnsR)


data(snnsData)
inputs <- snnsData$laser_1000.pat[,inputColumns(snnsData$laser_1000.pat)]
outputs <- snnsData$laser_1000.pat[,outputColumns(snnsData$laser_1000.pat)]

patterns <- splitForTrainingAndTest(inputs, outputs, ratio=0.15)

modelJordan <- jordan(patterns$inputsTrain, patterns$targetsTrain, 
                       size=c(8), learnFuncParams=c(0.1), maxit=100,
                       inputsTest=patterns$inputsTest, 
                       targetsTest=patterns$targetsTest, linOut=FALSE)

names(modelJordan)

par(mfrow=c(3,3))
plotIterativeError(modelJordan)

plotRegressionError(patterns$targetsTrain, modelJordan$fitted.values)
plotRegressionError(patterns$targetsTest, modelJordan$fittedTestValues)
hist(modelJordan$fitted.values - patterns$targetsTrain, col="lightblue")

plot(inputs, type="l")
plot(inputs[1:100], type="l")
lines(outputs[1:100], col="red")
lines(modelJordan$fitted.values[1:100], col="green")

RSNNS

Neural Networks using the Stuttgart Neural Network Simulator (SNNS)

v0.4-12
LGPL (>= 2) | file LICENSE
Authors
Christoph Bergmeir [aut, cre, cph], José M. Benítez [ths], Andreas Zell [ctb] (Part of original SNNS development team), Niels Mache [ctb] (Part of original SNNS development team), Günter Mamier [ctb] (Part of original SNNS development team), Michael Vogt [ctb] (Part of original SNNS development team), Sven Döring [ctb] (Part of original SNNS development team), Ralf Hübner [ctb] (Part of original SNNS development team), Kai-Uwe Herrmann [ctb] (Part of original SNNS development team), Tobias Soyez [ctb] (Part of original SNNS development team), Michael Schmalzl [ctb] (Part of original SNNS development team), Tilman Sommer [ctb] (Part of original SNNS development team), Artemis Hatzigeorgiou [ctb] (Part of original SNNS development team), Dietmar Posselt [ctb] (Part of original SNNS development team), Tobias Schreiner [ctb] (Part of original SNNS development team), Bernward Kett [ctb] (Part of original SNNS development team), Martin Reczko [ctb] (Part of original SNNS external contributors), Martin Riedmiller [ctb] (Part of original SNNS external contributors), Mark Seemann [ctb] (Part of original SNNS external contributors), Marcus Ritt [ctb] (Part of original SNNS external contributors), Jamie DeCoster [ctb] (Part of original SNNS external contributors), Jochen Biedermann [ctb] (Part of original SNNS external contributors), Joachim Danz [ctb] (Part of original SNNS development team), Christian Wehrfritz [ctb] (Part of original SNNS development team), Patrick Kursawe [ctb] (Contributors to SNNS Version 4.3), Andre El-Ama [ctb] (Contributors to SNNS Version 4.3)
Initial release
2019-09-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.