Read.mnist: Read MNIST Dataset

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Read.mnist.R

Description

read and arrange informations from MNIST dataset.

Usage

1
Read.mnist(filename)

Arguments

filename

filename of a MNIST dataset (example: "t10k-images.idx3-ubyte")

Details

It will return a list (Info) including all necessary informations. If it's a label file, Info will contain : $magic_number $labels $number $mark(the style of dataset); If it's a image file, Info will contain : $ magic_number $pic(each row is a image) $nrow $ncol $number $mark(the style of dataset); And if it's other invalid file, Info will be empty, and the function will print error messages.

Value

magic_number

the magic_number of file

labels

the labels information from the dataset(if it's a label file)

pic

the images from the dataset, and each row is one image.(if it's a image file)

nrow

the height of a image(if it's a image file)

ncol

the width of a image(if it's a image file)

number

the number of the dataset

itemmarkthe remark of the Info

Author(s)

Jiang Junfeng

References

https://stackoverflow.com/questions/21521571/how-to-read-mnist-database-in-r

Examples

1
  Info <- Read.mnist(system.file("exdata/t10k-labels.idx1-ubyte", package="readmnist"))

Example output



readmnist documentation built on May 2, 2019, 6:03 a.m.