O'Reilly logo

Neural Network Programming with Java by Fábio M. Soares, Alan M.F. Souza

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hands-on MLP implementation!

Now, let's implement all the theory that we've discussed so far. Here, we use the classes that define the ANN structures NeuralNet, Layer, Neuron, and so on. Now, we add HiddenLayer and OutputLayer functions, which are inherited from the Layer class, to implement multilayer neural networks.

We also implement the two learning algorithms that we've presented in this chapter: Backpropagation and Levenberg–Marquardt. In the Training class, we add two new terms to the enum Training types: BACKPROPAGATION and LEVENBERG_MARQUARDT.

In order to make the execution of the Levenberg–Marquardt algorithm possible, we add a new package called edu.packt.neuralnet.util and two more classes, namely Matrix and IdentityMatrix. These classes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required