org.joone.engine.learning
Class AbstractTeacherSynapse
- java.lang.Object
-
- org.joone.engine.Synapse
-
- org.joone.engine.learning.AbstractTeacherSynapse
-
- All Implemented Interfaces:
- java.io.Serializable, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, OutputPatternListener, Inspectable
- Direct Known Subclasses:
- TeacherSynapse
public abstract class AbstractTeacherSynapse extends Synapse
This class provides a framework to extend in order to implement various teachers, just by overriding or implementing certain functions different functionality can easily implemented.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AbstractTeacherSynapse()Creates a new instance of AbstractTeacherSynapse
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.TreeSetcheck()Base for check messages.PatternfwdGet()Here, it forwards (returns) the pushed error (in FIFO order).voidfwdPut(Pattern pattern)Method to put a pattern forward to the next layerStreamInputSynapsegetDesired()Gets the stream to read the desired output.voidinit()Synapse's initialization.voidnetStoppedError()voidreset()Reset the input and desired synapsesvoidresetInput()PatternrevGet()Returns the error pattern coming from the next layer during the training phasevoidrevPut(Pattern pattern)Method to put an error pattern backward to the previous layerbooleansetDesired(StreamInputSynapse newDesired)Set the input data stream containing desired training data.voidsetInputDimension(int newInputDimension)Sets the input dimension of the synapsevoidsetMonitor(Monitor newMonitor)Sets the Monitor object of the Teacher Synapse.-
Methods inherited from class org.joone.engine.Synapse
addNoise, canCountSteps, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getWeights, initLearner, InspectableTitle, Inspections, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, setEnabled, setIgnoreBefore, setInputFull, setLearningRate, setLoopBack, setMomentum, setName, setOutputDimension, setOutputFull, setWeights
-
-
-
-
Constructor Detail
-
AbstractTeacherSynapse
public AbstractTeacherSynapse()
Creates a new instance of AbstractTeacherSynapse
-
-
Method Detail
-
fwdGet
public Pattern fwdGet()
Here, it forwards (returns) the pushed error (in FIFO order).- Specified by:
fwdGetin interfaceInputPatternListener- Overrides:
fwdGetin classSynapse- Returns:
- the pattern holding the error of the network. {@link Synapse#fwdGet()
-
getDesired
public StreamInputSynapse getDesired()
Gets the stream to read the desired output.- Returns:
- the desired output stream.
-
setDesired
public boolean setDesired(StreamInputSynapse newDesired)
Set the input data stream containing desired training data.- Parameters:
newDesired- the stream from where to read the desired output.
-
setInputDimension
public void setInputDimension(int newInputDimension)
Description copied from class:SynapseSets the input dimension of the synapse- Specified by:
setInputDimensionin interfaceOutputPatternListener- Overrides:
setInputDimensionin classSynapse- Parameters:
newInputDimension- int
-
reset
public void reset()
Reset the input and desired synapses- Specified by:
resetin interfaceInputPatternListener- Overrides:
resetin classSynapse
-
resetInput
public void resetInput()
-
setMonitor
public void setMonitor(Monitor newMonitor)
Sets the Monitor object of the Teacher Synapse.- Specified by:
setMonitorin interfaceNeuralElement- Overrides:
setMonitorin classSynapse- Parameters:
newMonitor- neural.engine.Monitor
-
netStoppedError
public void netStoppedError()
-
init
public void init()
Description copied from class:SynapseSynapse's initialization. It needs to be invoked at the starting of the neural network It's called within the Layer.init() method- Specified by:
initin interfaceNeuralElement- Overrides:
initin classSynapse
-
check
public java.util.TreeSet check()
Description copied from class:SynapseBase for check messages. Subclasses should call this method from thier own check method.- Specified by:
checkin interfaceNeuralElement- Overrides:
checkin classSynapse- Returns:
- validation errors.
- See Also:
InputPaternListener,OutputPaternListener
-
revPut
public void revPut(Pattern pattern)
Description copied from interface:InputPatternListenerMethod to put an error pattern backward to the previous layer- Specified by:
revPutin interfaceInputPatternListener- Overrides:
revPutin classSynapse- Parameters:
pattern- neural.engine.Pattern
-
revGet
public Pattern revGet()
Description copied from interface:OutputPatternListenerReturns the error pattern coming from the next layer during the training phase- Specified by:
revGetin interfaceOutputPatternListener- Overrides:
revGetin classSynapse- Returns:
- neural.engine.Pattern
-
fwdPut
public void fwdPut(Pattern pattern)
Description copied from interface:OutputPatternListenerMethod to put a pattern forward to the next layer- Specified by:
fwdPutin interfaceOutputPatternListener- Overrides:
fwdPutin classSynapse- Parameters:
pattern- neural.engine.Pattern
-
-
DataMelt 3.0 © DataMelt by jWork.ORG