BasicMLDataSet
org.encog.ml.data.basic

Class BasicMLDataSet

    • Constructor Detail

      • BasicMLDataSet

        public BasicMLDataSet()
        Default constructor.
      • BasicMLDataSet

        public BasicMLDataSet(double[][] input,              double[][] ideal)
        Construct a data set from an input and idea array.
        Parameters:
        input - The input into the machine learning method for training.
        ideal - The ideal output for training.
      • BasicMLDataSet

        public BasicMLDataSet(List<MLDataPair> theData)
        Construct a data set from an already created list. Mostly used to duplicate this class.
        Parameters:
        theData - The data to use.
      • BasicMLDataSet

        public BasicMLDataSet(MLDataSet set)
        Copy whatever dataset type is specified into a memory dataset.
        Parameters:
        set - The dataset to copy.
    • Method Detail

      • add

        public void add(MLData theData)
        Add a object to the dataset. This is used with unsupervised training, as no ideal output is provided. Note: not all implemenations support the add methods.
        Specified by:
        add in interface MLDataSet
        Parameters:
        theData - The data item to be added.
      • add

        public void add(MLData inputData,       MLData idealData)
        Add a set of input and ideal data to the dataset. This is used with supervised training, as ideal output is provided. Note: not all implementations support the add methods.
        Specified by:
        add in interface MLDataSet
        Parameters:
        inputData - Input data.
        idealData - Ideal data.
      • add

        public void add(MLDataPair inputData)
        Add a an object to the dataset. This is used with unsupervised training, as no ideal output is provided. Note: not all implementations support the add methods.
        Specified by:
        add in interface MLDataSet
        Parameters:
        inputData - A MLDataPair object that contains both input and ideal data.
      • close

        public void close()
        Close this datasource and release any resources obtained by it, including any iterators created.
        Specified by:
        close in interface MLDataSet
      • getData

        public List<MLDataPair> getData()
        Get the data held by this container.
        Returns:
        the data
      • getIdealSize

        public int getIdealSize()
        Specified by:
        getIdealSize in interface MLDataSet
        Returns:
        The size of the input data.
      • getInputSize

        public int getInputSize()
        Specified by:
        getInputSize in interface MLDataSet
        Returns:
        The size of the input data.
      • getRecord

        public void getRecord(long index,             MLDataPair pair)
        Read an individual record, specified by index, in random order.
        Specified by:
        getRecord in interface MLDataSet
        Parameters:
        index - The index to read.
        pair - The pair that the record will be copied into.
      • getRecordCount

        public long getRecordCount()
        Determine the total number of records in the set.
        Specified by:
        getRecordCount in interface MLDataSet
        Returns:
        The total number of records in the set.
      • isSupervised

        public boolean isSupervised()
        Specified by:
        isSupervised in interface MLDataSet
        Returns:
        True if this is a supervised training set.
      • openAdditional

        public MLDataSet openAdditional()
        Opens an additional instance of this dataset.
        Specified by:
        openAdditional in interface MLDataSet
        Returns:
        The new instance.
      • setData

        public void setData(List<MLDataPair> theData)
        Parameters:
        theData - the data to set
      • toList

        public static List<MLDataPair> toList(MLDataSet theSet)
        Concert the data set to a list.
        Parameters:
        theSet - The data set to convert.
        Returns:
        The list.
      • size

        public int size()
        Specified by:
        size in interface MLDataSet

SCaVis 1.8 © jWork.org