3.29 Neural Networks

jHepWork contains the Joone package [18] which can be used to create a neural network (NN) framework, train and test artificial neural networks. jHepWork attempts to use this package using Jython scripts.

A complete example of how to train and verify the trained NN is located in the directory neural_net: Click on the file NN_train.py, and run it using the jHepWork editor. You will see a new tab with the log file, which contains the result of the NN training. This script reads the file wine_train.txt and the NN is trained using the first 150 raws of the data in this file. The first column represents the output, while other columns are input data. Note that the input data are normalized by the script. Then the NN is tested using 28 raws of the lines, and the result of this test is again written to the log file.

This NN_train.py script writes the NN in the serialized file nn_wine.snet. To perform a forecast using the set of the data in the file wine_forecast.txt, run the scrip NN_forecast.py (in this file, the output numbers are all set to zero).

This example is rather similar to that located in the file Validation_using_stream.java of the directory samples/engine/helpers of the Joone package. There are a lot of explanations in the jHepWork NN scripts, but you still should read the API of Joone packagehttp://www.jooneworld.com/, and especially its manual. The NN scripts were build using the package "org.joone.samples.engine.helpers"