Class TwentyNewsgroupReader


  • public final class TwentyNewsgroupReader
    extends java.lang.Object
    Reads the "20news-bydate" dataset into a vector space model as well as predictions based on the category.
    Author:
    thomas.jungblut
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static de.jungblut.math.tuple.Tuple3<java.util.List<java.lang.String>,​de.jungblut.math.dense.DenseDoubleVector,​java.lang.String[]> readTwentyNewsgroups​(java.io.File directory)
      Needs the "20news-bydate" directory that has test and train subdirectories given.
      • Methods inherited from class java.lang.Object

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

      • readTwentyNewsgroups

        public static de.jungblut.math.tuple.Tuple3<java.util.List<java.lang.String>,​de.jungblut.math.dense.DenseDoubleVector,​java.lang.String[]> readTwentyNewsgroups​(java.io.File directory)
        Needs the "20news-bydate" directory that has test and train subdirectories given.
        Returns:
        in tuple3 order: document as string, prediction, name mapping for prediction