Documentation of 'org.encog.ml.data.folded.FoldedDataSet' Java class
FoldedDataSet
org.encog.ml.data.folded

Class FoldedDataSet

  • All Implemented Interfaces:
    java.lang.Iterable<MLDataPair>, MLDataSet


    public class FoldedDataSet
    extends java.lang.Object
    implements MLDataSet
    A folded data set allows you to "fold" the data into several equal(or nearly equal) datasets. You then have the ability to select which fold the dataset will process. This is very useful for crossvalidation. This dataset works off of an underlying dataset. By default there are no folds (fold size 1). Call the fold method to create more folds.
    • Field Detail

      • ADD_NOT_SUPPORTED

        public static final java.lang.String ADD_NOT_SUPPORTED
        Error message: adds are not supported.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FoldedDataSet

        public FoldedDataSet(MLDataSet theUnderlying)
        Create a folded dataset.
        Parameters:
        theUnderlying - The underlying folded dataset.
    • Method Detail

      • add

        public void add(MLData data1)
        Not supported.
        Specified by:
        add in interface MLDataSet
        Parameters:
        data1 - Not used.
      • add

        public void add(MLData inputData,
                        MLData idealData)
        Not supported.
        Specified by:
        add in interface MLDataSet
        Parameters:
        inputData - Not used.
        idealData - Not used.
      • add

        public void add(MLDataPair inputData)
        Not supported.
        Specified by:
        add in interface MLDataSet
        Parameters:
        inputData - Not used.
      • close

        public void close()
        Close the dataset.
        Specified by:
        close in interface MLDataSet
      • fold

        public void fold(int theNumFolds)
        Fold the dataset. Must be done before the dataset is used.
        Parameters:
        theNumFolds - The number of folds.
      • getCurrentFold

        public int getCurrentFold()
        Returns:
        the currentFold
      • getCurrentFoldOffset

        public int getCurrentFoldOffset()
        Returns:
        the currentFoldOffset
      • getCurrentFoldSize

        public int getCurrentFoldSize()
        Returns:
        the currentFoldSize
      • getIdealSize

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

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

        public int getNumFolds()
        Returns:
        the numFolds
      • 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.
      • getUnderlying

        public MLDataSet getUnderlying()
        Returns:
        The underlying dataset.
      • isSupervised

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

        public java.util.Iterator<MLDataPair> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<MLDataPair>
      • openAdditional

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

        public void setCurrentFold(int theCurrentFold)
        Set the current fold.
        Parameters:
        theCurrentFold - the currentFold to set
      • setOwner

        public void setOwner(FoldedDataSet theOwner)
        Parameters:
        theOwner - The owner.
      • size

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

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.