Recognizing Handwritten Digits

Make a function that recognizes handwritten digits.

code

In[]:=
digit=Classify
1,
2,
1,
2,
4,
8,
9,
9,
3,
7,
1,
5,
5,
2,
7,
3,
8,
9,
8,
2,
0,
9,
7,
1,
5,
3,
7,
8,
9,
4,
7,
2,
7,
1,
7,
5,
9,
8,
8,
5,
0,
1,
5,
2,
9,
2,
9,
5,
9,
2,
1,
2,
3,
5,
9,
3,
1,
3,
3,
1,
9,
3,
3,
9,
2,
9,
9,
1,
8,
8,
0,
7,
7,
7,
0,
6,
2,
3,
8,
3,
1,
2,
6,
4,
1,
6,
3,
7,
3,
0,
1,
9,
0,
7,
1,
9,
9,
2,
7,
2
Run
Out[]=
ClassifierFunction
Input type: Image
Number of classes:
10


how it works

Given a set of training instances,
Classify
returns a classifier function:
In[]:=
digit=Classify
1,
2,
1,
2,
4,
8,
9,
9,
3,
7,
1,
5,
5,
2,
7,
3,
8,
9,
8,
2,
0,
9,
7,
1,
5,
3,
7,
8,
9,
4,
7,
2,
7,
1,
7,
5,
9,
8,
8,
5,
0,
1,
5,
2,
9,
2,
9,
5,
9,
2,
1,
2,
3,
5,
9,
3,
1,
3,
3,
1,
9,
3,
3,
9,
2,
9,
9,
1,
8,
8,
0,
7,
7,
7,
0,
6,
2,
3,
8,
3,
1,
2,
6,
4,
1,
6,
3,
7,
3,
0,
1,
9,
0,
7,
1,
9,
9,
2,
7,
2
Run
Out[]=
ClassifierFunction
Input type: Image
Number of classes:
10

Test the classifier on images that were not in the training set:
In[]:=
digit
,
,
,
,
,
,
,

Run
Out[]=
{1,0,5,3,9,6,5,1}
The classifier will return probabilities of alternative interpretations:
In[]:=
digit
,"TopProbabilities"
Run
Out[]=
{50.538659,80.184401,10.0605155,00.0602013}