Documentation of 'org.encog.ml.data.versatile.sources.CSVDataSource' Java class
CSVDataSource
org.encog.ml.data.versatile.sources

Class CSVDataSource

  • All Implemented Interfaces:
    VersatileDataSource


    public class CSVDataSource
    extends java.lang.Object
    implements VersatileDataSource
    Allow a CSV file to serve as a source for the versatile data source.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CSVDataSource(java.io.File file, boolean headers, char delim)
      Construct a CSV source from a filename.
      CSVDataSource(java.io.File file, boolean headers, CSVFormat format)
      Construct a CSV source from a filename.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int columnIndex(java.lang.String name)
      Obtain the column index for the specified name.
      java.lang.String[] readLine()
      Read a line from the source.
      void rewind()
      Rewind the source back to the beginning.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CSVDataSource

        public CSVDataSource(java.io.File file,
                             boolean headers,
                             char delim)
        Construct a CSV source from a filename. The format parameter specifies the separator character to use, as well as the number format.
        Parameters:
        file - The file.
        headers - The headers.
        delim - The delimiter.
      • CSVDataSource

        public CSVDataSource(java.io.File file,
                             boolean headers,
                             CSVFormat format)
        Construct a CSV source from a filename. Allows a delimiter character to be specified.
        Parameters:
        file - The file.
        headers - The headers.
        format - The format.
    • Method Detail

      • readLine

        public java.lang.String[] readLine()
        Read a line from the source.
        Specified by:
        readLine in interface VersatileDataSource
        Returns:
        The values read.
      • rewind

        public void rewind()
        Rewind the source back to the beginning.
        Specified by:
        rewind in interface VersatileDataSource
      • columnIndex

        public int columnIndex(java.lang.String name)
        Obtain the column index for the specified name.
        Specified by:
        columnIndex in interface VersatileDataSource
        Parameters:
        name - The column name.
        Returns:
        The column index, or -1 if not found.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.