Documentation of 'org.neuroph.core.data.BufferedDataSet' Java class
BufferedDataSet
org.neuroph.core.data

Class BufferedDataSet

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<DataSetRow>, java.util.Collection<DataSetRow>, java.util.Iterator<DataSetRow>, java.util.List<DataSetRow>


    public class BufferedDataSet
    extends DataSet
    implements java.util.Iterator<DataSetRow>
    This class can be used for large training sets, which are partialy read from file during the training. It loads bufferSize rows from file into DataSet, and when it iterates all of them, it takes next bufferSize rows. It can be used everywhere where DataSet class is used since it extends it. The rows should be iterated with iterator() interface.
    See Also:
    Serialized Form
    • Constructor Detail

      • BufferedDataSet

        public BufferedDataSet(java.io.File file,
                               int inputSize,
                               java.lang.String delimiter)
      • BufferedDataSet

        public BufferedDataSet(java.io.File file,
                               int inputSize,
                               int outputSize,
                               java.lang.String delimiter)
                        throws java.io.FileNotFoundException
        Creates new buffered data set with specified file, input and output size. Data set file is assumed to be txt value with data set rows in a single line, with input and output vector values delimited by delimiter.
        Parameters:
        file - datas et file
        inputSize - size of input vector
        outputSize - size of outut vector
        delimiter - delimiter for vector values
        Throws:
        java.io.FileNotFoundException
    • Method Detail

      • iterator

        public java.util.Iterator<DataSetRow> iterator()
        Returns iterator for buffered data set
        Specified by:
        iterator in interface java.lang.Iterable<DataSetRow>
        Specified by:
        iterator in interface java.util.Collection<DataSetRow>
        Specified by:
        iterator in interface java.util.List<DataSetRow>
        Overrides:
        iterator in class DataSet
        Returns:
      • hasNext

        public boolean hasNext()
        Returns true if there are more rows, false otherwise
        Specified by:
        hasNext in interface java.util.Iterator<DataSetRow>
        Returns:
        true if there are more rows, false otherwise
      • next

        public DataSetRow next()
        Returns next data set row. Note that if there are no more buffered rows, this mthod will load next bufferSize rows into buffer.
        Specified by:
        next in interface java.util.Iterator<DataSetRow>
        Returns:
        next data set row
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<DataSetRow>

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.