de.webdings.jannis.neuralnet

Class Teacher


public class Teacher
extends java.lang.Object

Teacher is used to train a neural net. Currently only training by backpropagation of errors for 2-layer-nets is supported.

Version:
0.1 11.08.2005

Author:
Stefan Thesing
Website: http://www.webdings.de

Field Summary

protected Pattern[]
desiredOutput
Teacher compares the output the net is supposed to produce to the output actually produced by the net and changes synapse weights slowly into a direction that brings the net closer to producing the desired output.

Constructor Summary

Teacher(String fileNameDesiredOutput, NeuralNet net)
Teacher(String fileNameDesiredOutput, Neuron[][] layers)
Teacher(Pattern[] desiredOutput, NeuralNet net)
Teacher(Pattern[] desiredOutput, Neuron[][] layers)

Method Summary

Pattern[]
getDesiredOutput()
void
teach()
starts comparing the actual output produced by the net with desired ouput and then backpropagates the error.

Field Details

desiredOutput

protected Pattern[] desiredOutput
Teacher compares the output the net is supposed to produce to the output actually produced by the net and changes synapse weights slowly into a direction that brings the net closer to producing the desired output.

Constructor Details

Teacher

public Teacher(String fileNameDesiredOutput,
               NeuralNet net)
            throws PatternCreateException,
                   IOException

Parameters:
fileNameDesiredOutput -
net -

Throws:
PatternCreateException -


Teacher

public Teacher(String fileNameDesiredOutput,
               Neuron[][] layers)
            throws PatternCreateException,
                   IOException

Parameters:
fileNameDesiredOutput -
layers -

Throws:
PatternCreateException -


Teacher

public Teacher(Pattern[] desiredOutput,
               NeuralNet net)

Parameters:
desiredOutput -
net -


Teacher

public Teacher(Pattern[] desiredOutput,
               Neuron[][] layers)

Parameters:
desiredOutput -
layers -

Method Details

getDesiredOutput

public Pattern[] getDesiredOutput()

Returns:
the desired output the net is supposed to produced


teach

public void teach()
            throws PatternGiverReaderCommunicationException
starts comparing the actual output produced by the net with desired ouput and then backpropagates the error.

Throws:
PatternGiverReaderCommunicationException -


Teacher.java - Copyright (c) 2005 by Stefan Thesing

This file is part of Jannis.

Jannis is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Jannis is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Jannis; if not, write to the
Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA



© 2005 by Stefan Thesing;
Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.