Documentation of 'org.joone.engine.Synapse' Java class
Synapse
org.joone.engine

Class Synapse

    • Constructor Summary

      Constructors 
      Constructor and Description
      Synapse()
      The constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addNoise(double amplitude)
      Adds a noise to the weights of the synapse
      boolean canCountSteps()
      Returns TRUE if the synapse calls the method nextStep() on the Monitor object when the fwdGet() method is called
      java.util.TreeSet check()
      Base for check messages.
      Pattern fwdGet()
      Returns the pattern coming from the previous layer during the recall phase
      void fwdPut(Pattern pattern)
      Method to put a pattern forward to the next layer
      int getIgnoreBefore()
      Returns the number of the ignored cycles at beginning of each epoch.
      int getInputDimension()
      Returns the input dimension of the synapse.
      Learner getLearner()
      Returns the appropriate Learner object for this class depending on the Monitor.learningMode property value
      double getLearningRate()
      Returns the value of the learning rate
      double getMomentum()
      Returns the value of the momentum
      Monitor getMonitor()
      Returns the Monitor object attached to the synapse
      java.lang.String getName()
      Returns the name of the synapse
      int getOutputDimension()
      Returns the output dimension of the synapse.
      Matrix getWeights()
      Getter for the internal matrix of weights
      void init()
      Synapse's initialization.
      void initLearner()
      Initialize the Learner object
      java.lang.String InspectableTitle()
      Method to get the title to show in the InspectionFrame tab.
      java.util.Collection Inspections()
      Method to get a collection of inspectable objects.
      boolean isEnabled()
      Getter for property enabled.
      boolean isInputFull()
      Getter for property inputFull.
      boolean isLoopBack()
      Getter for property loopBack.
      boolean isOutputFull()
      Getter for property outputFull.
      void randomize(double amplitude)
      Initializes all the weigths of the synapses with random values
      void reset()
      Resets the internal state to be ready for the next run
      Pattern revGet()
      Returns the error pattern coming from the next layer during the training phase
      void revPut(Pattern pattern)
      Method to put an error pattern backward to the previous layer
      void setEnabled(boolean enabled)
      Setter for property enabled.
      void setIgnoreBefore(int newIgnoreBefore)
      Sets the number of the ignored cycles at beginning of each epoch.
      void setInputDimension(int newInputDimension)
      Sets the input dimension of the synapse
      void setInputFull(boolean inputFull)
      Setter for property inputFull.
      void setLearningRate(double newLearningRate)
      Sets the value of the learning rate
      void setLoopBack(boolean loopBack)
      Setter for property loopBack.
      void setMomentum(double newMomentum)
      Sets the value of the momentum rate
      void setMonitor(Monitor newMonitor)
      Sets the Monitor object of the synapse
      void setName(java.lang.String name)
      Sets the name of the synapse
      void setOutputDimension(int newOutputDimension)
      Sets the output dimension of the synapse
      void setOutputFull(boolean outputFull)
      Setter for property outputFull.
      void setWeights(Matrix newWeights)
      Setter for the internal matrix of weights
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Synapse

        public Synapse()
        The constructor
    • Method Detail

      • addNoise

        public void addNoise(double amplitude)
        Adds a noise to the weights of the synapse
        Parameters:
        amplitude - Amplitude of the noise: the value is centered around the zero. e.g.: an amplitude = 0.2 means a noise range from -0.2 to 0.2
      • randomize

        public void randomize(double amplitude)
        Initializes all the weigths of the synapses with random values
        Parameters:
        amplitude - Amplitude of the random values: the value is centered around the zero. e.g.: an amplitude = 0.2 means a values' range from -0.2 to 0.2
      • canCountSteps

        public boolean canCountSteps()
        Returns TRUE if the synapse calls the method nextStep() on the Monitor object when the fwdGet() method is called
        Returns:
        boolean
      • reset

        public void reset()
        Resets the internal state to be ready for the next run
        Specified by:
        reset in interface InputPatternListener
      • getIgnoreBefore

        public int getIgnoreBefore()
        Returns the number of the ignored cycles at beginning of each epoch. During these cycles the synapse returns null on the call to the xxxGet methods
        Returns:
        int
        See Also:
        setIgnoreBefore(int)
      • getLearningRate

        public double getLearningRate()
        Returns the value of the learning rate
        Specified by:
        getLearningRate in interface LearnableSynapse
        Returns:
        double
      • getMomentum

        public double getMomentum()
        Returns the value of the momentum
        Specified by:
        getMomentum in interface LearnableSynapse
        Returns:
        double
      • revPut

        public void revPut(Pattern pattern)
        Description copied from interface: InputPatternListener
        Method to put an error pattern backward to the previous layer
        Specified by:
        revPut in interface InputPatternListener
        Parameters:
        pattern - neural.engine.Pattern
      • setIgnoreBefore

        public void setIgnoreBefore(int newIgnoreBefore)
        Sets the number of the ignored cycles at beginning of each epoch. During these cycles the synapse is disabled. Useful when the synapse is attached as the Input2 of a SwitchSynapse
        Parameters:
        newIgnoreBefore - int
        See Also:
        SwitchSynapse
      • setInputDimension

        public void setInputDimension(int newInputDimension)
        Sets the input dimension of the synapse
        Specified by:
        setInputDimension in interface OutputPatternListener
        Parameters:
        newInputDimension - int
      • setLearningRate

        public void setLearningRate(double newLearningRate)
        Sets the value of the learning rate
        Parameters:
        newLearningRate - double
      • setMomentum

        public void setMomentum(double newMomentum)
        Sets the value of the momentum rate
        Parameters:
        newMomentum - double
      • setMonitor

        public void setMonitor(Monitor newMonitor)
        Sets the Monitor object of the synapse
        Specified by:
        setMonitor in interface NeuralElement
        Parameters:
        newMonitor - neural.engine.Monitor
      • setName

        public void setName(java.lang.String name)
        Sets the name of the synapse
        Specified by:
        setName in interface NeuralElement
        Parameters:
        name - The name of the component.
        See Also:
        getName()
      • setOutputDimension

        public void setOutputDimension(int newOutputDimension)
        Sets the output dimension of the synapse
        Specified by:
        setOutputDimension in interface InputPatternListener
        Parameters:
        newOutputDimension - int
      • isEnabled

        public boolean isEnabled()
        Getter for property enabled.
        Specified by:
        isEnabled in interface NeuralElement
        Returns:
        Value of property enabled.
      • setEnabled

        public void setEnabled(boolean enabled)
        Setter for property enabled.
        Specified by:
        setEnabled in interface NeuralElement
        Parameters:
        enabled - New value of property enabled.
      • isLoopBack

        public boolean isLoopBack()
        Getter for property loopBack.
        Returns:
        Value of property loopBack.
      • setLoopBack

        public void setLoopBack(boolean loopBack)
        Setter for property loopBack.
        Parameters:
        loopBack - New value of property loopBack.
      • check

        public java.util.TreeSet check()
        Base for check messages. Subclasses should call this method from thier own check method.
        Specified by:
        check in interface NeuralElement
        Returns:
        validation errors.
        See Also:
        InputPaternListener, OutputPaternListener
      • Inspections

        public java.util.Collection Inspections()
        Description copied from interface: Inspectable
        Method to get a collection of inspectable objects.
        Specified by:
        Inspections in interface Inspectable
        Returns:
        list of Inspectable objects
        See Also:
        org.joone.Inspection
      • InspectableTitle

        public java.lang.String InspectableTitle()
        Description copied from interface: Inspectable
        Method to get the title to show in the InspectionFrame tab.
        Specified by:
        InspectableTitle in interface Inspectable
        Returns:
        title of the class.
        See Also:
        org.joone.InspectionFrame
      • isInputFull

        public boolean isInputFull()
        Getter for property inputFull.
        Specified by:
        isInputFull in interface InputPatternListener
        Returns:
        Value of property inputFull.
      • setInputFull

        public void setInputFull(boolean inputFull)
        Setter for property inputFull.
        Specified by:
        setInputFull in interface InputPatternListener
        Parameters:
        inputFull - New value of property inputFull.
      • isOutputFull

        public boolean isOutputFull()
        Getter for property outputFull.
        Specified by:
        isOutputFull in interface OutputPatternListener
        Returns:
        Value of property outputFull.
      • setOutputFull

        public void setOutputFull(boolean outputFull)
        Setter for property outputFull.
        Specified by:
        setOutputFull in interface OutputPatternListener
        Parameters:
        outputFull - New value of property outputFull.
      • getWeights

        public Matrix getWeights()
        Getter for the internal matrix of weights
        Specified by:
        getWeights in interface LearnableSynapse
        Returns:
        the Matrix containing the 2D array of weights
      • setWeights

        public void setWeights(Matrix newWeights)
        Setter for the internal matrix of weights
        Specified by:
        setWeights in interface LearnableSynapse
        Parameters:
        the - Matrix containing the 2D array of weights
      • getLearner

        public Learner getLearner()
        Returns the appropriate Learner object for this class depending on the Monitor.learningMode property value
        Specified by:
        getLearner in interface Learnable
        Returns:
        the Learner object if applicable, otherwise null
        See Also:
        Learnable.getLearner()
      • init

        public void init()
        Synapse's initialization. It needs to be invoked at the starting of the neural network It's called within the Layer.init() method
        Specified by:
        init in interface NeuralElement

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.