Class CsvDatasetReader


  • public final class CsvDatasetReader
    extends java.lang.Object
    Binary dataset reader from CSVs.
    Author:
    thomas.jungblut
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Dataset readCsv​(java.lang.String path, char separator, java.lang.Character quote, int outcomeIndex, boolean skipHeader, boolean cacheOutcomeVectors)
      Reads a csv into feature and outcome arrays.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • readCsv

        public static Dataset readCsv​(java.lang.String path,
                                      char separator,
                                      java.lang.Character quote,
                                      int outcomeIndex,
                                      boolean skipHeader,
                                      boolean cacheOutcomeVectors)
        Reads a csv into feature and outcome arrays.
        Parameters:
        path - the path to read from
        separator - the separator to use
        quote - the quote, null if none present
        outcomeIndex - the index of the outcome, everything else is considered a feature.
        skipHeader - if true it will skip parsing the first line.
        cacheOutcomeVectors - if true it caches the vectors based on the outcome value. This saves a ton of memory for classification problems that share only a couple of unique values.
        Returns:
        a new dataset.