Documentation of 'org.encog.ml.data.basic.BasicMLDataPair' Java class
BasicMLDataPair
org.encog.ml.data.basic

Class BasicMLDataPair

  • All Implemented Interfaces:
    java.io.Serializable, MLDataPair, CentroidFactory<MLDataPair>
    Direct Known Subclasses:
    BasicNeuralDataPair


    public class BasicMLDataPair
    extends java.lang.Object
    implements MLDataPair, java.io.Serializable
    A basic implementation of the MLDataPair interface. This implementation simply holds and input and ideal MLData object. For supervised training both input and ideal should be specified. For unsupervised training the input property should be valid, however the ideal property should contain null.
    See Also:
    Serialized Form
    • Constructor Detail

      • BasicMLDataPair

        public BasicMLDataPair(MLData theInput)
        Construct the object with only input. If this constructor is used, then unsupervised training is being used.
        Parameters:
        theInput - The input to the machine learning method.
      • BasicMLDataPair

        public BasicMLDataPair(MLData theInput,
                               MLData theIdeal)
        Construct a BasicMLDataPair class with the specified input and ideal values.
        Parameters:
        theInput - The input to the machine learning method.
        theIdeal - The expected results from the machine learning method.
    • Method Detail

      • createPair

        public static MLDataPair createPair(int inputSize,
                                            int idealSize)
        Create a new data pair object of the correct size for the machine learning method that is being trained. This object will be passed to the getPair method to allow the data pair objects to be copied to it.
        Parameters:
        inputSize - The size of the input data.
        idealSize - The size of the ideal data.
        Returns:
        A new data pair object.
      • getIdeal

        public MLData getIdeal()
        Specified by:
        getIdeal in interface MLDataPair
        Returns:
        The ideal data that the neural network should produce for the specified input.
      • getIdealArray

        public double[] getIdealArray()
        Specified by:
        getIdealArray in interface MLDataPair
        Returns:
        The ideal data that the machine learning method should produce for the specified input.
      • getInput

        public MLData getInput()
        Specified by:
        getInput in interface MLDataPair
        Returns:
        The input that the neural network
      • getInputArray

        public double[] getInputArray()
        Specified by:
        getInputArray in interface MLDataPair
        Returns:
        The input that the neural network
      • isSupervised

        public boolean isSupervised()
        Specified by:
        isSupervised in interface MLDataPair
        Returns:
        True if this training pair is supervised. That is, it has both input and ideal data.
      • setIdealArray

        public void setIdealArray(double[] data)
        Set the ideal data, the desired output.
        Specified by:
        setIdealArray in interface MLDataPair
        Parameters:
        data - The ideal data.
      • setInputArray

        public void setInputArray(double[] data)
        Set the input.
        Specified by:
        setInputArray in interface MLDataPair
        Parameters:
        data - The input.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getSignificance

        public double getSignificance()
        Get the significance, 1.0 is neutral.
        Specified by:
        getSignificance in interface MLDataPair
        Returns:
        The significance.
      • setSignificance

        public void setSignificance(double significance)
        Set the significance, 1.0 is neutral.
        Specified by:
        setSignificance in interface MLDataPair
        Parameters:
        significance - The significance.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.