Classification of MNIST data
Introduction
In this notebook we show how to make and run a Machine Learning (ML) classification pipeline over of handwritten digits.
Setup
Load the monad
In[17]:=
Needs["AntonAntonov`MonadicContextualClassification`"]
Data
In[18]:=
mnistData=ExampleData[{"MachineLearning","MNIST"},"Data"];
In[23]:=
mnistData//Dimensions
Out[23]=
{70000}
Pipeline
In[21]:=
SeedRandom[3423];p=
[mnistData]⟹
[0.7]⟹
⟹
["NearestNeighbors"]⟹
[{"Accuracy","ConfusionMatrixPlot"}]⟹
;
ClConUnit |
ClConSplitData |
ClConSummarizeData |
ClConMakeClassifier |
ClConClassifierMeasurements |
ClConEchoValue |
Out[21]=
RandomGeneratorState
|
»
summaries:trainingData
,testData
1 column 1 | ||||||||||||||
|
1 column 1 | ||||||||||||
|
1 column 1 | ||||||||||||||
|
1 column 1 | ||||||||||||
|
»
value:Accuracy0.960246,ConfusionMatrixPlot
Here we plot the ROC curve for a specified digit:
In[24]:=
p⟹
["ClassLabels"5];
ClConROCPlot |
»
ROC plot(s):5
|
|
""

