Description Usage Arguments Details Value Examples
View source: R/downloadAndLoad.R
load_mnist
Loads the mnist dataset as the lists trainSet and testSet into
the current workspace.
1 | load_mnist(where = "./")
|
where |
Path to the folder containing the mnist directory. Default assumes that the current working directory contains the mnist folder. |
Assuming that you have downloaded the dataset with the download_mnist
function, the load_mnist
function loads the data into the lists trainSet and testSet.
Both lists have three elements named n, x and y. n is the number of samples, x is the
28 by 28 images in rows and y is the label of the images. This function is inspired by
the gist: brendan o'connor - gist.github.com/39760 - anyall.org
Returns TRUE
if successful.
1 2 3 4 5 6 7 8 9 | ## Not run:
download_mnist('somePathToStore/')
load_mnist('samePathAsAbove/')
# Check the number of elements in training set
trainSet$n
# Plot a random digit
(ggDigit(trainSet$x[sample(1:trainSet$n,1),]))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.