usps {Rdimtools} | R Documentation |
Load USPS handwritten digits data
Description
The well-known USPS handwritten digits from "0" to "9". Though the original version
of each digit is given as a matrix of grayscale image, it is
convention to vectorize it. For each digit, 1100 examples are given.
Usage
data(usps)
Format
a named list containing
- data
an
matrix where each row is a number.
- label
(factor) a length-
class label in
.
Examples
# load the data
data(usps)
# visualize
opar <- par(no.readonly=TRUE, mfrow=c(1,3), pty="s")
image(t(matrix(usps$data[4400,],nrow=16)[16:1,])) # last of digit 4
image(t(matrix(usps$data[9900,],nrow=16)[16:1,])) # last of digit 9
image(t(matrix(usps$data[6600,],nrow=16)[16:1,])) # last of digit 6
par(opar)
[Package Rdimtools version 1.1.2 Index]