Documentation of 'org.joone.samples.util.ParityInputSynapse' Java class
ParityInputSynapse
org.joone.samples.util

Class ParityInputSynapse

  • All Implemented Interfaces:
    java.io.Serializable, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, OutputPatternListener, Inspectable, InputSynapse, PlugInListener


    public class ParityInputSynapse
    extends StreamInputSynapse

    This synapse creates input and desired output data for the parity problem. The parity problem is the problem where numbers (in binary form) having an even number of ones should output a zero and numbers having an odd number of ones should output a one.

    The partity problem is a problem that is often used to test new learning algorithms, etc., because the problem is quite difficult. Whenever one bit changes the output should be the opposite.

    This class is also mainly created to test new techniques.

    The default size of the parity problem is two, that is, it creates the training data for the XOR problem.

    See Also:
    Serialized Form
    • Constructor Detail

      • ParityInputSynapse

        public ParityInputSynapse()
        Creates a new instance of ParityInputSynapse
    • Method Detail

      • setParitySize

        public void setParitySize(int aSize)
        Sets the number of bits the parity problem should consist of, that is, the number of bits the input should consist of. For example, a size 2, is the XOR problem.
        Parameters:
        aSize - the size / number of bits for the input.
      • getParitySize

        public int getParitySize()
        Gets the parity size, that is, the number of bits of the input pattern.
        Returns:
        the parity size.
      • getNumOfPatterns

        public int getNumOfPatterns()
        Gets the number of patterns that exist for the parity problem, that is 2^parity-size.
        Returns:
        the number of patterns that exist for the parity problem based on the parity size.
      • setUpperBit

        public void setUpperBit(double aValue)
        Sets the value for the upper bit.
        Parameters:
        aValue - the value to use for the upper bit.
      • getUpperBit

        public double getUpperBit()
        Gets the value used for the upper bit.
      • setLowerBit

        public void setLowerBit(double aValue)
        Sets the value for the lower bit.
        Parameters:
        aValue - the value to use for the lower bit.
      • getLowerBit

        public double getLowerBit()
        Gets the value used for the lower bit.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.