org.joone.util
Class LearningSwitch
- java.lang.Object
-
- org.joone.engine.Synapse
-
- org.joone.io.StreamInputSynapse
-
- org.joone.io.InputSwitchSynapse
-
- org.joone.util.LearningSwitch
-
- All Implemented Interfaces:
- java.io.Serializable, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, OutputPatternListener, Inspectable, InputSynapse, PlugInListener
public class LearningSwitch extends InputSwitchSynapse
This class is useful to switch the input data set of a neural network from a training set to a validation set depending on the 'validation' parameter contained in the Monitor object. Very useful during a training phase to test the generalization capacity of the neural network with a validation data set never seen before.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description LearningSwitch()Creates a new instance of LearningSwitch
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanaddTrainingSet(StreamInputSynapse tSet)booleanaddValidationSet(StreamInputSynapse vSet)java.util.TreeSetcheck()Check that parameters are set correctly.PatternfwdGet()Connects the right input synapse depending on the Monitor's 'validation' parameterPatternfwdGet(InputConnector conn)Connects the right input synapse depending on the Monitor's 'validation' parameter.StreamInputSynapsegetTrainingSet()Getter for property trainingSet.StreamInputSynapsegetValidationSet()Getter for property validationSet.voidremoveTrainingSet()voidremoveValidationSet()voidsetTrainingSet(StreamInputSynapse trainingSet)Setter for property trainingSet.voidsetValidationSet(StreamInputSynapse validationSet)Setter for property validationSet.-
Methods inherited from class org.joone.io.InputSwitchSynapse
addInputSynapse, dataChanged, getActiveInput, getAdvancedColumnSelector, getAllInputs, getDefaultInput, getFirstRow, getInspections, getLastRow, getMonitor, getName, getOutputDimension, getPlugIn, gotoFirstLine, gotoLine, init, isBuffered, isEOF, isStepCounter, numColumns, readAll, removeAllInputs, removeInputSynapse, reset, resetInput, resetSwitch, revPut, setActiveInput, setAllInputs, setBuffered, setDecimalPoint, setDefaultInput, setMonitor, setName, setOutputDimension, setStepCounter
-
Methods inherited from class org.joone.io.StreamInputSynapse
addPlugIn, addPlugInListener, getAllPlugInListeners, getCurrentRow, getDecimalPoint, getFirstCol, getInputPatterns, getInputVector, getLastCol, getMaxBufSize, getStream, InspectableTitle, Inspections, removeAllPlugIns, removePlugInListener, setAdvancedColumnSelector, setFirstCol, setFirstRow, setInputPatterns, setLastCol, setLastRow, setMaxBufSize, setPlugin, setPlugIn
-
Methods inherited from class org.joone.engine.Synapse
addNoise, canCountSteps, fwdPut, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getWeights, initLearner, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, revGet, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setOutputFull, setWeights
-
-
-
-
Method Detail
-
addTrainingSet
public boolean addTrainingSet(StreamInputSynapse tSet)
-
addValidationSet
public boolean addValidationSet(StreamInputSynapse vSet)
-
removeTrainingSet
public void removeTrainingSet()
-
removeValidationSet
public void removeValidationSet()
-
fwdGet
public Pattern fwdGet()
Connects the right input synapse depending on the Monitor's 'validation' parameter- Specified by:
fwdGetin interfaceInputPatternListener- Overrides:
fwdGetin classInputSwitchSynapse- Returns:
- neural.engine.Pattern
-
fwdGet
public Pattern fwdGet(InputConnector conn)
Connects the right input synapse depending on the Monitor's 'validation' parameter. Added to be compatible with the InputConnector class.- Overrides:
fwdGetin classInputSwitchSynapse- Returns:
- neural.engine.Pattern
-
check
public java.util.TreeSet check()
Description copied from class:InputSwitchSynapseCheck that parameters are set correctly.- Specified by:
checkin interfaceNeuralElement- Overrides:
checkin classInputSwitchSynapse- Returns:
- validation errors.
- See Also:
Synapse
-
getTrainingSet
public StreamInputSynapse getTrainingSet()
Getter for property trainingSet. Added for XML serialization- Returns:
- Value of property trainingSet.
-
setTrainingSet
public void setTrainingSet(StreamInputSynapse trainingSet)
Setter for property trainingSet. Added for XML serialization- Parameters:
trainingSet- New value of property trainingSet.
-
getValidationSet
public StreamInputSynapse getValidationSet()
Getter for property validationSet. Added for XML serialization- Returns:
- Value of property validationSet.
-
setValidationSet
public void setValidationSet(StreamInputSynapse validationSet)
Setter for property validationSet. Added for XML serialization- Parameters:
validationSet- New value of property validationSet.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG