Package smile.deep
Interface Dataset
- All Superinterfaces:
Iterable<SampleBatch>
- All Known Implementing Classes:
ImageDataset
A dataset consists of data and an associated target (label)
and can be iterated in mini-batches.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Dataset
MNIST contains 70,000 images of handwritten digits: 60,000 for training and 10,000 for testing.static Dataset
of
(double[][] data, double[] target, int batch) Creates a dataset of numeric arrays.static Dataset
of
(double[][] data, int[] target, int batch) Creates a dataset of numeric arrays.static Dataset
of
(float[][] data, float[] target, int batch) Creates a dataset of numeric arrays.static Dataset
of
(float[][] data, int[] target, int batch) Creates a dataset of numeric arrays.static Dataset
Returns a dataset.long
size()
Returns the size of dataset.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
size
long size()Returns the size of dataset.- Returns:
- the size of dataset.
-
of
Creates a dataset of numeric arrays.- Parameters:
data
- the data.target
- the target.batch
- the mini-batch size.- Returns:
- the dataset.
-
of
Creates a dataset of numeric arrays.- Parameters:
data
- the data.target
- the target.batch
- the mini-batch size.- Returns:
- the dataset.
-
of
Creates a dataset of numeric arrays.- Parameters:
data
- the data.target
- the target.batch
- the mini-batch size.- Returns:
- the dataset.
-
of
Creates a dataset of numeric arrays.- Parameters:
data
- the data.target
- the target.batch
- the mini-batch size.- Returns:
- the dataset.
-
of
Returns a dataset.- Parameters:
formula
- a symbolic description of the model to be fitted.df
- the data frame of the explanatory and response variables.batch
- the mini-batch size.- Returns:
- the dataset.
-
mnist
MNIST contains 70,000 images of handwritten digits: 60,000 for training and 10,000 for testing. The images are grayscale, 28x28 pixels, and centered.- Parameters:
path
- the data folder path.trainMode
- load training or test data.batch
- the mini-batch size.- Returns:
- the MNIST dataset.
-