mnist: MNIST handwritten digits dataset

Description Usage Arguments Format Details Source Examples

Description

A dataset of handwritten digits provided by http://yann.lecun.com/exdb/mnist/.

Usage

1
2
mnist
download.mnist(range = c(0, 1), global = FALSE)

Arguments

range

the range of the pixel intensity values. If c(0, 255) the pixel intensities will be the raw integer values. By default, they are continuous between 0 and 1. If possible an integer matrix is returned.

global

if TRUE, the mnist dataset will be permanently replaced in the package's directory and global environment. Useful to change the range in a persisting manner.

Format

A list with:

Details

At the first time the package is loaded, the mnist dataset is downloaded from http://yann.lecun.com/exdb/mnist/ and saved in the package data directory.

Source

Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based learning applied to document recognition." Proceedings of the IEEE, 86(11):2278-2324, November 1998.

The dataset is downloaded with code inspired from: https://gist.github.com/brendano/39760

Examples

1
2
3
4
5
6
7
8
9
data(mnist) # the dataset is implicitly loaded when the package is attached, so this line is optionnal
str(mnist)

show.digit(mnist$test$x[1:10,])

## Not run: 
mnist.copy <- download.mnist()

## End(Not run)

xrobin/mnist documentation built on Dec. 14, 2020, 11:28 a.m.