dataeval.utils.dataset.datasets.MNIST ===================================== .. py:class:: dataeval.utils.dataset.datasets.MNIST(root, train = True, download = False, size = -1, unit_interval = False, dtype = None, channels = None, flatten = False, normalize = None, corruption = None, classes = None, balance = True, randomize = True, slice_back = False, verbose = True) MNIST Dataset and Corruptions. :param root: str | ``pathlib.Path`` Root directory of dataset where the ``mnist_c/`` folder exists. :param train: bool, default True If True, creates dataset from ``train_images.npy`` and ``train_labels.npy``. :param download: bool, default False If True, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again. :param size: int, default -1 Limit the dataset size, must be a value greater than 0. :param unit_interval: bool, default False Shift the data values to the unit interval [0-1]. :param dtype: type | None, default None Change the :term:`NumPy` dtype - data is loaded as np.uint8 :param channels: Literal['channels_first' | 'channels_last'] | None, default None Location of channel axis if desired, default has no channels (N, 28, 28) :param flatten: bool, default False Flatten data into single dimension (N, 784) - cannot use both channels and flatten, channels takes priority over flatten. :param normalize: tuple[mean, std] | None, default None Normalize images acorrding to provided mean and standard deviation :param corruption: Literal['identity' | 'shot_noise' | 'impulse_noise' | 'glass_blur' | 'motion_blur' | 'shear' | 'scale' | 'rotate' | 'brightness' | 'translate' | 'stripe' | 'fog' | 'spatter' | 'dotted_line' | 'zigzag' | 'canny_edges'] | None, default None The desired corruption style or None. :param classes: Literal["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"] | int | list[int] | list[Literal["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]] | None, default None Option to select specific classes from dataset. :param balance: bool, default True If True, returns equal number of samples for each class. :param randomize: bool, default True If True, shuffles the data prior to selection - uses a set seed for reproducibility. :param slice_back: bool, default False If True and size has a value greater than 0, then grabs selection starting at the last image. :param verbose: bool, default True If True, outputs print statements.