smile.data.parser
Class BinarySparseDatasetParser
- java.lang.Object
-
- smile.data.parser.BinarySparseDatasetParser
-
public class BinarySparseDatasetParser extends java.lang.ObjectParser for binary spare dataset. In the file, each line is a datum as an integer list, which are the indices of nonzero elements. During the parsing, the duplicated indices will be removed and indices will be sorted into ascending order.
-
-
Constructor Summary
Constructors Constructor and Description BinarySparseDatasetParser()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description BinarySparseDatasetparse(java.io.File file)Parse a binary sparse dataset from given file.BinarySparseDatasetparse(java.io.InputStream stream)Parse a binary sparse dataset from an input stream.BinarySparseDatasetparse(java.lang.String path)Parse a binary sparse dataset from given file.BinarySparseDatasetparse(java.lang.String name, java.io.File file)Parse a binary sparse dataset from given file.BinarySparseDatasetparse(java.lang.String name, java.io.InputStream stream)Parse a binary sparse dataset from an input stream.BinarySparseDatasetparse(java.lang.String name, java.lang.String path)Parse a binary sparse dataset from given file.BinarySparseDatasetparse(java.lang.String name, java.net.URI uri)Parse a binary sparse dataset from given URI.BinarySparseDatasetparse(java.net.URI uri)Parse a binary sparse dataset from given URI.
-
-
-
Method Detail
-
parse
public BinarySparseDataset parse(java.net.URI uri) throws java.io.IOException, java.text.ParseException
Parse a binary sparse dataset from given URI.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public BinarySparseDataset parse(java.lang.String name, java.net.URI uri) throws java.io.IOException, java.text.ParseException
Parse a binary sparse dataset from given URI.- Parameters:
uri- the URI of data source.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public BinarySparseDataset parse(java.lang.String path) throws java.io.IOException, java.text.ParseException
Parse a binary sparse dataset from given file.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public BinarySparseDataset parse(java.lang.String name, java.lang.String path) throws java.io.IOException, java.text.ParseException
Parse a binary sparse dataset from given file.- Parameters:
path- the file path of data source.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public BinarySparseDataset parse(java.io.File file) throws java.io.IOException, java.text.ParseException
Parse a binary sparse dataset from given file.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public BinarySparseDataset parse(java.lang.String name, java.io.File file) throws java.io.IOException, java.text.ParseException
Parse a binary sparse dataset from given file.- Parameters:
file- the file of data source.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public BinarySparseDataset parse(java.io.InputStream stream) throws java.io.IOException, java.text.ParseException
Parse a binary sparse dataset from an input stream.- Parameters:
stream- the input stream of data.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public BinarySparseDataset parse(java.lang.String name, java.io.InputStream stream) throws java.io.IOException, java.text.ParseException
Parse a binary sparse dataset from an input stream.- Parameters:
name- the name of dataset.stream- the input stream of data.- Throws:
java.io.IOExceptionjava.text.ParseException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG