Description Usage Arguments Format Details Source Examples
A dataset of handwritten digits provided by http://yann.lecun.com/exdb/mnist/.
1 2 | mnist
download.mnist(range = c(0, 1), global = FALSE)
|
range |
the range of the pixel intensity values. If |
global |
if |
A list with:
train, test
: 60000 train and 10000 test digits. Both contain x
(data) and y
(labels) elements. x
is a matrix with 784 columns (pixels).
show.digit
: a function to display a digit. Takes the following arguments:
digit
: a digit, i.e. a row of mnist$train$x
or mnist$test$x
col
: a colour gradient, see image
for more details
...
: further arguments for image
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.
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.