public interface Read
| Modifier and Type | Method and Description |
|---|---|
static smile.data.DataFrame |
arff(java.nio.file.Path path)
Reads an ARFF file.
|
static smile.data.DataFrame |
arff(java.lang.String path)
Reads an ARFF file.
|
static smile.data.DataFrame |
arrow(java.nio.file.Path path)
Reads an Apache Arrow file.
|
static smile.data.DataFrame |
arrow(java.lang.String path)
Reads an Apache Arrow file.
|
static smile.data.DataFrame |
avro(java.nio.file.Path path,
java.io.InputStream schema)
Reads an Apache Avro file.
|
static smile.data.DataFrame |
avro(java.nio.file.Path path,
java.nio.file.Path schema)
Reads an Apache Avro file.
|
static smile.data.DataFrame |
avro(java.lang.String path,
java.io.InputStream schema)
Reads an Apache Avro file.
|
static smile.data.DataFrame |
avro(java.lang.String path,
java.lang.String schema)
Reads an Apache Avro file.
|
static smile.data.DataFrame |
csv(java.nio.file.Path path)
Reads a CSV file.
|
static smile.data.DataFrame |
csv(java.nio.file.Path path,
org.apache.commons.csv.CSVFormat format)
Reads a CSV file.
|
static smile.data.DataFrame |
csv(java.nio.file.Path path,
org.apache.commons.csv.CSVFormat format,
smile.data.type.StructType schema)
Reads a CSV file.
|
static smile.data.DataFrame |
csv(java.lang.String path)
Reads a CSV file.
|
static smile.data.DataFrame |
csv(java.lang.String path,
org.apache.commons.csv.CSVFormat format)
Reads a CSV file.
|
static smile.data.DataFrame |
csv(java.lang.String path,
org.apache.commons.csv.CSVFormat format,
smile.data.type.StructType schema)
Reads a CSV file.
|
static smile.data.DataFrame |
json(java.nio.file.Path path)
Reads a JSON file.
|
static smile.data.DataFrame |
json(java.nio.file.Path path,
JSON.Mode mode,
smile.data.type.StructType schema)
Reads a JSON file.
|
static smile.data.DataFrame |
json(java.lang.String path)
Reads a JSON file.
|
static smile.data.DataFrame |
json(java.lang.String path,
JSON.Mode mode,
smile.data.type.StructType schema)
Reads a JSON file.
|
static smile.data.Dataset<smile.data.Instance<smile.util.SparseArray>> |
libsvm(java.io.BufferedReader reader)
Reads a libsvm sparse dataset.
|
static smile.data.Dataset<smile.data.Instance<smile.util.SparseArray>> |
libsvm(java.nio.file.Path path)
Reads a libsvm sparse dataset.
|
static smile.data.Dataset<smile.data.Instance<smile.util.SparseArray>> |
libsvm(java.lang.String path)
Reads a libsvm sparse dataset.
|
static smile.data.DataFrame |
parquet(java.nio.file.Path path)
Reads an Apache Parquet file.
|
static smile.data.DataFrame |
parquet(java.lang.String path)
Reads an Apache Parquet file.
|
static smile.data.DataFrame |
sas(java.nio.file.Path path)
Reads a SAS7BDAT file.
|
static smile.data.DataFrame |
sas(java.lang.String path)
Reads a SAS7BDAT file.
|
static smile.data.DataFrame csv(java.lang.String path)
throws java.io.IOException,
java.net.URISyntaxException
java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame csv(java.lang.String path,
org.apache.commons.csv.CSVFormat format)
throws java.io.IOException,
java.net.URISyntaxException
java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame csv(java.lang.String path,
org.apache.commons.csv.CSVFormat format,
smile.data.type.StructType schema)
throws java.io.IOException,
java.net.URISyntaxException
java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame csv(java.nio.file.Path path)
throws java.io.IOException
java.io.IOExceptionstatic smile.data.DataFrame csv(java.nio.file.Path path,
org.apache.commons.csv.CSVFormat format)
throws java.io.IOException
java.io.IOExceptionstatic smile.data.DataFrame csv(java.nio.file.Path path,
org.apache.commons.csv.CSVFormat format,
smile.data.type.StructType schema)
throws java.io.IOException
java.io.IOExceptionstatic smile.data.DataFrame json(java.lang.String path)
throws java.io.IOException,
java.net.URISyntaxException
java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame json(java.lang.String path,
JSON.Mode mode,
smile.data.type.StructType schema)
throws java.io.IOException,
java.net.URISyntaxException
java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame json(java.nio.file.Path path)
throws java.io.IOException
java.io.IOExceptionstatic smile.data.DataFrame json(java.nio.file.Path path,
JSON.Mode mode,
smile.data.type.StructType schema)
throws java.io.IOException
java.io.IOExceptionstatic smile.data.DataFrame arff(java.lang.String path)
throws java.io.IOException,
java.text.ParseException,
java.net.URISyntaxException
A dataset is firstly described, beginning with the name of the dataset (or the relation in ARFF terminology). Each of the variables (or attribute in ARFF terminology) used to describe the observations is then identified, together with their data type, each definition on a single line. The actual observations are then listed, each on a single line, with fields separated by commas, much like a CSV file.
Missing values in an ARFF dataset are identified using the question mark '?'.
Comments can be included in the file, introduced at the beginning of a line with a '%', whereby the remainder of the line is ignored.
A significant advantage of the ARFF data file over the CSV data file is the meta data information.
Also, the ability to include comments ensure we can record extra information about the data set, including how it was derived, where it came from, and how it might be cited.
path - the input file path.java.io.IOExceptionjava.text.ParseExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame arff(java.nio.file.Path path)
throws java.io.IOException,
java.text.ParseException
A dataset is firstly described, beginning with the name of the dataset (or the relation in ARFF terminology). Each of the variables (or attribute in ARFF terminology) used to describe the observations is then identified, together with their data type, each definition on a single line. The actual observations are then listed, each on a single line, with fields separated by commas, much like a CSV file.
Missing values in an ARFF dataset are identified using the question mark '?'.
Comments can be included in the file, introduced at the beginning of a line with a '%', whereby the remainder of the line is ignored.
A significant advantage of the ARFF data file over the CSV data file is the meta data information.
Also, the ability to include comments ensure we can record extra information about the data set, including how it was derived, where it came from, and how it might be cited.
path - the input file path.java.io.IOExceptionjava.text.ParseExceptionstatic smile.data.DataFrame sas(java.lang.String path)
throws java.io.IOException,
java.net.URISyntaxException
path - the input file path.java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame sas(java.nio.file.Path path)
throws java.io.IOException
path - the input file path.java.io.IOExceptionstatic smile.data.DataFrame arrow(java.lang.String path)
throws java.io.IOException,
java.net.URISyntaxException
path - the input file path.java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame arrow(java.nio.file.Path path)
throws java.io.IOException
path - the input file path.java.io.IOExceptionstatic smile.data.DataFrame avro(java.lang.String path,
java.io.InputStream schema)
throws java.io.IOException,
java.net.URISyntaxException
path - the input data file path.schema - the input stream of schema.java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame avro(java.lang.String path,
java.lang.String schema)
throws java.io.IOException,
java.net.URISyntaxException
path - the input data file path.schema - the input schema file path.java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame avro(java.nio.file.Path path,
java.io.InputStream schema)
throws java.io.IOException
path - the input data file path.schema - the input stream of schema.java.io.IOExceptionstatic smile.data.DataFrame avro(java.nio.file.Path path,
java.nio.file.Path schema)
throws java.io.IOException
path - the input data file path.schema - the input schema file path.java.io.IOExceptionstatic smile.data.DataFrame parquet(java.lang.String path)
throws java.io.IOException,
java.net.URISyntaxException
path - the input file path.java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.DataFrame parquet(java.nio.file.Path path)
throws java.io.IOException
path - the input file path.java.io.IOExceptionstatic smile.data.Dataset<smile.data.Instance<smile.util.SparseArray>> libsvm(java.lang.String path)
throws java.io.IOException,
java.net.URISyntaxException
<label> <index1>:<value1> <index2>:<value2> ...
where <label> is the target value of the training data. For classification, it should be an integer which identifies a class (multi-class classification is supported). For regression, it's any real number. For one-class SVM, it's not used so can be any number. <index> is an integer starting from 1, and <value> is a real number. The indices must be in an ascending order. The labels in the testing data file are only used to calculate accuracy or error. If they are unknown, just fill this column with a number.
path - the input file path.java.io.IOExceptionjava.net.URISyntaxExceptionstatic smile.data.Dataset<smile.data.Instance<smile.util.SparseArray>> libsvm(java.nio.file.Path path)
throws java.io.IOException
<label> <index1>:<value1> <index2>:<value2> ...
where <label> is the target value of the training data. For classification, it should be an integer which identifies a class (multi-class classification is supported). For regression, it's any real number. For one-class SVM, it's not used so can be any number. <index> is an integer starting from 1, and <value> is a real number. The indices must be in an ascending order. The labels in the testing data file are only used to calculate accuracy or error. If they are unknown, just fill this column with a number.
path - the input file path.java.io.IOExceptionstatic smile.data.Dataset<smile.data.Instance<smile.util.SparseArray>> libsvm(java.io.BufferedReader reader)
throws java.io.IOException
<label> <index1>:<value1> <index2>:<value2> ...
where <label> is the target value of the training data. For classification, it should be an integer which identifies a class (multi-class classification is supported). For regression, it's any real number. For one-class SVM, it's not used so can be any number. <index> is an integer starting from 1, and <value> is a real number. The indices must be in an ascending order. The labels in the testing data file are only used to calculate accuracy or error. If they are unknown, just fill this column with a number.
reader - the input reader.java.io.IOException