Documentation of 'jsat.ARFFLoader' Java class
ARFFLoader
jsat

Class ARFFLoader



  • public class ARFFLoader
    extends java.lang.Object
    Class for loading ARFF files. ARFF is a human readable file format used by Weka. The ARFF file formal allows for attributes that have missing information, which are encoded in JSAT as Double.NaN for numeric features, and a -1 for categorical features.
    About Weka
    • Constructor Summary

      Constructors 
      Constructor and Description
      ARFFLoader() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static SimpleDataSet loadArffFile(java.io.File file)
      Uses the given file path to load a data set from an ARFF file.
      static SimpleDataSet loadArffFile(java.io.Reader input)
      Uses the given reader to load a data set assuming it follows the ARFF file format
      static void writeArffFile(DataSet data, java.io.OutputStream os) 
      static void writeArffFile(DataSet data, java.io.OutputStream os, java.lang.String relation)
      Writes out the dataset as an ARFF file to the given stream.
      • Methods inherited from class java.lang.Object

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

      • ARFFLoader

        public ARFFLoader()
    • Method Detail

      • loadArffFile

        public static SimpleDataSet loadArffFile(java.io.File file)
        Uses the given file path to load a data set from an ARFF file.
        Parameters:
        file - the path to the ARFF file to load
        Returns:
        the data set from the ARFF file, or null if the file could not be loaded.
      • loadArffFile

        public static SimpleDataSet loadArffFile(java.io.Reader input)
        Uses the given reader to load a data set assuming it follows the ARFF file format
        Parameters:
        input - the reader to load the data set from
        Returns:
        the data set from the stream, or null of the file could not be loaded
      • writeArffFile

        public static void writeArffFile(DataSet data,
                                         java.io.OutputStream os)
      • writeArffFile

        public static void writeArffFile(DataSet data,
                                         java.io.OutputStream os,
                                         java.lang.String relation)
        Writes out the dataset as an ARFF file to the given stream. This method will automatically handle the target variable of ClassificationDataSet and RegressionDataSet.
        Parameters:
        data - the dataset to write out
        os - the output stream to write too
        relation - the relation label to write out

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.