jsat
Class ARFFLoader
- java.lang.Object
-
- jsat.ARFFLoader
-
public class ARFFLoader extends java.lang.ObjectClass 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 asDouble.NaNfor numeric features, and a-1for 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 SimpleDataSetloadArffFile(java.io.File file)Uses the given file path to load a data set from an ARFF file.static SimpleDataSetloadArffFile(java.io.Reader input)Uses the given reader to load a data set assuming it follows the ARFF file formatstatic voidwriteArffFile(DataSet data, java.io.OutputStream os)static voidwriteArffFile(DataSet data, java.io.OutputStream os, java.lang.String relation)Writes out the dataset as an ARFF file to the given stream.
-
-
-
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 ofClassificationDataSetandRegressionDataSet.- Parameters:
data- the dataset to write outos- the output stream to write toorelation- the relation label to write out
-
-
DataMelt 3.0 © DataMelt by jWork.ORG