iui-group-l-name-zensiert/0-pilot-project/MNIST.ipynb

1026 lines
78 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"id": "9507bfb9",
"metadata": {},
"source": [
"### Load MNIST dataset"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "1ed54820",
"metadata": {},
"outputs": [],
"source": [
"# Python ≥3.5 is required\n",
"import sys\n",
"assert sys.version_info >= (3, 5)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "532fc961",
"metadata": {},
"outputs": [],
"source": [
"# scikit-learn ≥0.20 is required\n",
"import sklearn\n",
"assert sklearn.__version__ >= \"0.20\""
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "37391208",
"metadata": {},
"outputs": [],
"source": [
"# common imports\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "aaf9d74d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"sklearn.utils.Bunch"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# import function to scikit-learn datasets\n",
"from sklearn.datasets import fetch_openml\n",
"\n",
"# load specified dataset (MNIST)\n",
"mnist = fetch_openml('mnist_784', version=1, as_frame=False)\n",
"\n",
"# print type of dataset\n",
"type(mnist)"
]
},
{
"cell_type": "markdown",
"id": "02444b3c",
"metadata": {},
"source": [
"Bunch objects are sometimes used as an output for functions and methods. They extend dictionaries by enabling values to be accessed by key, bunch[\"value_key\"], or by an attribute, bunch.value_key.\\\n",
"=> dictionary"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "60abd5bd",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"dict_keys(['name', 'age'])"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Reminder of how dicts work\n",
"example = {'name': 'somename', 'age': 15}\n",
"example.keys()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "f9eb1a3e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"dict_keys(['data', 'target', 'frame', 'categories', 'feature_names', 'target_names', 'DESCR', 'details', 'url'])"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# let us check out the keys of the mnist dataset\n",
"mnist.keys()"
]
},
{
"cell_type": "markdown",
"id": "6ffbf39a",
"metadata": {},
"source": [
"Datasets loaded by Scikit-Learn generally have a similar dictionary structure, including the following:\\\n",
"* __DESCR__ a key describing the dataset\n",
"* __data__ a key containing an array with one row per instance and one column per feature\n",
"* __target__ a key containing an array with labels, one for each row of the data key"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "2b3ee5f6",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"\"The MNIST database of handwritten digits with 784 features. It can be split in a training set of the first 60,000 examples, and a test set of 10,000 examples \\n\\nIt is a subset of a larger set available from NIST. The digits have been size-normalized and centered in a fixed-size image. It is a good database for people who want to try learning techniques and pattern recognition methods on real-world data while spending minimal efforts on preprocessing and formatting. The original black and white (bilevel) images from NIST were size normalized to fit in a 20x20 pixel box while preserving their aspect ratio. The resulting images contain grey levels as a result of the anti-aliasing technique used by the normalization algorithm. the images were centered in a 28x28 image by computing the center of mass of the pixels, and translating the image so as to position this point at the center of the 28x28 field. \\n\\nWith some classification methods (particularly template-based methods, such as SVM and K-nearest neighbors), the error rate improves when the digits are centered by bounding box rather than center of mass. If you do this kind of pre-processing, you should report it in your publications. The MNIST database was constructed from NIST's NIST originally designated SD-3 as their training set and SD-1 as their test set. However, SD-3 is much cleaner and easier to recognize than SD-1. The reason for this can be found on the fact that SD-3 was collected among Census Bureau employees, while SD-1 was collected among high-school students. Drawing sensible conclusions from learning experiments requires that the result be independent of the choice of training set and test among the complete set of samples. Therefore it was necessary to build a new database by mixing NIST's datasets. \\n\\nThe MNIST training set is composed of 30,000 patterns from SD-3 and 30,000 patterns from SD-1. Our test set was composed of 5,000 patterns from SD-3 and 5,000 patterns from SD-1. The 60,000 pattern training set contained examples from approximately 250 writers. We made sure that the sets of writers of the training set and test set were disjoint. SD-1 contains 58,527 digit images written by 500 different writers. In contrast to SD-3, where blocks of data from each writer appeared in sequence, the data in SD-1 is scrambled. Writer identities for SD-1 is available and we used this information to unscramble the writers. We then split SD-1 in two: characters written by the first 250 writers went into our new training set. The remaining 250 writers were placed in our test set. Thus we had two sets with nearly 30,000 examples each. The new training set was completed with enough examples from SD-3, starting at pattern # 0, to make a full set of 60,000 training patterns. Similarly, the new test set was completed with SD-3 examples starting at pattern # 35,000 to make a full set with 60,000 test patterns. Only a subset of 10,000 test images (5,000 from SD-1 and 5,000 from SD-3) is available on this site. The full 60,000 sample training set is available.\\n\\nDownloaded from openml.org.\""
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mnist[\"DESCR\"]"
]
},
{
"cell_type": "markdown",
"id": "04b6042e",
"metadata": {},
"source": [
"### Prepare the MNIST dataset"
]
},
{
"cell_type": "markdown",
"id": "0c6a4dcf",
"metadata": {},
"source": [
"$f(X) = y$\n",
"\n",
"$X$ is the data that we have and\\\n",
"$y$ is what we want to predict\n",
"\n",
"In this example, we have images of handwritten digits $X$ and want to predict the digit $y$. In ML, we show the algorithm examples of X and y so that it learns the function $f(X) = y$. If it is successful, we can present $X$ to the algorithm that we did not train with and still get the $y$."
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "53f4723d",
"metadata": {},
"outputs": [],
"source": [
"X, y = mnist[\"data\"], mnist[\"target\"]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "0c9ba2bb",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"numpy.ndarray"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(X)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "cb7b421b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(70000, 784)"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"X.shape"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "82e2f7ba",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(70000,)"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"y.shape"
]
},
{
"cell_type": "markdown",
"id": "65185c61",
"metadata": {},
"source": [
"### Plot data"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "8370fd0e",
"metadata": {},
"outputs": [],
"source": [
"# import plotting libraries\n",
"import matplotlib as mpl\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "448321e3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'numpy.ndarray'>\n",
"(784,)\n"
]
}
],
"source": [
"# numpy type\n",
"print(type(X))\n",
"\n",
"example_digit = X[0]\n",
"print(example_digit.shape)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "7f66718a",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(28, 28)\n"
]
}
],
"source": [
"# change shape\n",
"example_digit = example_digit.reshape(28, 28)\n",
"print(example_digit.shape)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "ba95d655",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPsAAAD4CAYAAAAq5pAIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAOUElEQVR4nO3dX4xUdZrG8ecF8R+DCkuHtAyRGTQmHY1AStgEg+hk8U+iwI2BGERjxAuQmQTiolzAhRdGd2YyihnTqAE2IxPCSITErIMEY4iJoVC2BZVFTeNA+FOE6Dh6gTLvXvRh0mLXr5qqU3XKfr+fpNPV56nT502Fh1Ndp7t+5u4CMPQNK3oAAK1B2YEgKDsQBGUHgqDsQBAXtfJgY8eO9YkTJ7bykEAovb29OnX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xv+lyMeu3uXPG1VE2Y9KmtDv659n29qCux/NPp+UtFXttxT1iXMr6GafTxY8z7+00zLeAy0zrjZ47Ipc/ryIsu+RdJ2Z/cLMLpY0X9K2Aub4ETMbmb1wIjMbKWm22m8p6m2SFmW3F0l6vcBZfqBdlvGutsy4Cn7sCl/+3N1b/iHpbvW9Iv+ZpFVFzFBlrl9K+t/s40DRs0napL6ndd+p77WNhyX9m6Sdkg5JekvSmDaa7b8lfSipR33F6ixotlvU9xS9R9K+7OPuoh+7xFwtedz4dVkgCF6gA4Kg7EAQlB0IgrIDQVB2IAjKDgRB2YEg/h/vpjt5hXz6+gAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"# plot example digit\n",
"plt.imshow(example_digit, cmap=mpl.cm.binary)\n",
"#plt.axis(\"off\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "7d665e31",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"5\n",
"<class 'str'>\n"
]
}
],
"source": [
"# plot label of example image\n",
"print(y[0])\n",
"print(type(y[0]))"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "e12786e6",
"metadata": {},
"outputs": [],
"source": [
"# convert string labels to int\n",
"y = y.astype(np.uint8)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "b114c10d",
"metadata": {},
"outputs": [],
"source": [
"# function to quickly plot an image\n",
"def plot_digit(data):\n",
" image = data.reshape(28, 28)\n",
" plt.imshow(image, cmap = mpl.cm.binary, interpolation=\"nearest\")\n",
" plt.axis(\"off\")"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "5f4d40c4",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24z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TphPxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmh/mmzz/jVZMDv58kJocQJocQJocQJocQJocQJof4Ftv8iCGE1mZwAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"# quickly plot a single digit\n",
"plot_digit(X[1])"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "5a18f4f9",
"metadata": {},
"outputs": [],
"source": [
"# function to quickly plot several digits\n",
"def plot_digits(instances, **options):\n",
" size = 28\n",
" images = [instance.reshape(size,size) for instance in instances]\n",
" image = np.concatenate(images, axis=1)\n",
" plt.imshow(image, cmap = mpl.cm.binary, **options)\n",
" plt.axis(\"off\")"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "fdd1cc4d",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgQAAABACAYAAABlVG/FAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAzS0lEQVR4nO2d6XOb13X/v9gXYt8IkABJkAT3nYoWyhYt2fJuxU5aN46dzmT8sm2SV/0nMm3euW4nXTxTN5mkit1kPJEsK5Jsi1pISlzAfQUBEgCx7zue3wv97g0pUbIckwAoP58ZTyZcxAvgee5z7jnf8z0chmHAwsLCwsLC8u2GW+4FsLCwsLCwsJQfNiBgYWFhYWFhYQMCFhYWFhYWFjYgYGFhYWFhYQEbELCwsLCwsLCADQhYWFhYWFhYAPC/4vtsTyILCwsLC8uTBWevL7IZAhYWFhYWFhY2IGBhYWFhYWFhAwIWFhYWFhYWfLWGgIWFhYVlB8ViEb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d5ETUujutHcsNqSNub28jFovR/lGRSASpVEqtJitlvY8LmUqpUCjA5/PR19dH6++VSiqVwtzcHBwOB5LJJAwGA3Q6HVpaWqiJzGH7HB4GaUHicDg4d+4c1dvsZ7/0N0EkEkGj0aC/v58q8wFgaGiImhEdtiB5J+RgUgmvgcPh0Hr3mTNnEAgE4PP5oFAoUFtbS8e570V1dTW15q20w9bjstPLn0BKtlKpFEKhkJoAsXw9KuqK8Pl8uHTpEiYnJxEIBGCxWFBTU1NRSn1iVrK0tIRYLEYtSolQhZwSDhtyuRyvv/46AOCnP/1pyYaafBNCoRA++eQTrK6uIpfLoa+vD6dPn8bZs2dhtVorXtD5deDxeBgcHMTAwAC++93vAsCu9Hy5EYvFMBqNeOutt/CDH/yAfv0wXEeHka6uLnR2duLZZ5994HuPeq+f1M+BlGxZvhkVFRCQTYV8sGRuvVwur6gLeeeccAKJzg+zOOWwbd4MwyCVSlEvcJPJhK6uLigUiicqGNhJJQUBe1Hp63uSYN9rlv2monZNsVgMs9kMpVIJDoeDjo4OPP300/T/VxL334wajQZ1dXWHOiA4bBSLxQcCgt7e3n31IWdhYWH5tlBRGQKlUon+/n6o1WqcOXMGbW1tMBqNFTUQRCQS4dSpU+jq6sLAwADtt25vb0djY2NF19xZWFhYWFgeRkUFBCRDYDab8dRTT5V7OXvC4/Fgs9nAMMyuYTlEAVtpmYwnGeKRL5FIaN83+/6zsLCw/GVwvsIBsLLsASuMne8d+yAqPalUihpDpdNpqq6upK4UFhYWlgpkzw2SDQhYWFhYWFi+XewZEHxVyYA9ZrGwsLCwsHwLqKguAxYWFhYWFpbywAYELCwsLCwsLGxAwMLCwsLCwsIGBCwsLCwsLCxgAwIWFhYWFhYWsAEBCwsLCwsLC4D/B6jl0cvB/92lAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 648x648 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"# quickly plot several digits\n",
"plt.figure(figsize=(9,9))\n",
"plot_digits(X[100:110])\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "88c50f5b",
"metadata": {},
"source": [
"### Prepare data for machine learning"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "0ebec6fa",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"70000"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# how many images do we have\n",
"len(X)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "6e0cb6ee",
"metadata": {},
"outputs": [],
"source": [
"# we use the first 60000 for training and test with the other 10000 images\n",
"X_train, X_test, y_train, y_test = X[:100], X[100:], y[:100], y[100:]"
]
},
{
"cell_type": "markdown",
"id": "6edf6046",
"metadata": {},
"source": [
"### Train classifier"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "549db50c",
"metadata": {},
"outputs": [],
"source": [
"# import support vector machine\n",
"import sklearn.svm"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "92297e2c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"SVC(C=10, kernel='poly')"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# specify the parameter of the SVM\n",
"classifier = sklearn.svm.SVC(C=10, gamma=\"scale\", kernel=\"poly\") #gamma=0.1 degree=3\n",
"\n",
"# train the SVM\n",
"classifier.fit(X_train, y_train)"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "c08adc09",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGJUlEQVR4nO3dO2gUexjGYVds7BIlaVRsbLQTLUQRC0G0shBBCxtFwRtY2WjlpbeJlSBio2UQrMSAKIJgFwUxsdLGIuAFiRfYUx9O9pvDTja+yT5P6cvsjpEfA/7ZTafb7a4C8qz+2zcALEycEEqcEEqcEEqcEGpNw+6/cmHwOgv9oScnhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhBInhFrzt29gGM3NzfXc1q1bt4R3srTm5+fL/dy5cz23Bw8elNe+ePGi3Ldv317uiTw5IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZRzzgG4c+dOuU9MTPTcHj16VF67cePGvu4pwczMTLnfu3ev79eenZ0td+ecwKIRJ4QSJ4QSJ4QSJ4QSJ4RylNKHd+/elfvFixfL/devXz23qamp8toTJ06Ue7I2RyXDyJMTQokTQokTQokTQokTQokTQokTQjnn7MPv37/LvTrHbHL37t1yTz7n/PTpU7lPTk72/dpbt24t9127dvX92qk8OSGUOCGUOCGUOCGUOCGUOCGUOCGUc04WTdM5ZtNXY3Y6nZ7btWvXymuX81eG9uLJCaHECaHECaHECaHECaHECaHECaGccw5At9vt+9rR0dFFvJOldfv27XJv83PZu3dv39cuV56cEEqcEEqcEEqcEEqcEEqcEEqcEMo5Zx8+fPhQ7tXnEpscP36872sH7fPnz+X+7du3cm/6ubT5ua1EnpwQSpwQSpwQSpwQSpwQSpwQylHKAl69elXux44dW6I7yXL58uVy//jxY6vXv379es9t/fr1rV57OfLkhFDihFDihFDihFDihFDihFDihFBDec45PT1d7leuXCn3+fn5cm/z0adbt26V+9u3b8v91KlT5b5hw4Zy//LlS89tamqqvLbJpk2byv306dM9t9Wrh+85Mnx/Y1gmxAmhxAmhxAmhxAmhxAmhxAmhVuw557Nnz3puhw8fLq/9+vXrYt/O//by5ctW+5MnT8q9+rmsWlV/ZrPt5zV3795d7mNjY61ef6Xx5IRQ4oRQ4oRQ4oRQ4oRQ4oRQ4oRQK/ac8+jRoz236jOL/0e32211/fj4eM/t58+f5bVN9970WdULFy6U+/3793tubf/ee/bsaXX9sPHkhFDihFDihFDihFDihFDihFDihFCdhrOrdgdbAzQzM1PuO3bs6Ll9//691Xvv37+/3Ju+93bz5s09tx8/fpTXXrp0qdybPs/Z5jt1m2zZsqXcnz59Wu5N36m7gi34j+LJCaHECaHECaHECaHECaHECaGW7UfGmv7b/uDBgz239+/fl9devXq13A8dOlTua9euLfc2Jicny/3169flvm/fvsW8nX85cOBAuQ/xUUlfPDkhlDghlDghlDghlDghlDghlDgh1LI952zy8OHDv30LA9F0hjoyMrI0N8LAeXJCKHFCKHFCKHFCKHFCKHFCKHFCqBV7zjms3rx5M7DXbvo85tmzZwf23sPIkxNCiRNCiRNCiRNCiRNCiRNCiRNCOedcZubm5sr95s2b5d7wKx9LJ0+eLPdt27b1/dr8lycnhBInhBInhBInhBInhBInhHKUsszcuHGj3Kenp8u90+mU+86dO3tu58+fL69lcXlyQihxQihxQihxQihxQihxQihxQijnnGGeP39e7hMTEwN9/yNHjvTcxsbGBvre/JsnJ4QSJ4QSJ4QSJ4QSJ4QSJ4QSJ4Ryzhnm8ePH5f7nz59Wrz8+Pl7uZ86cafX6LB5PTgglTgglTgglTgglTgglTgglTgjlnDPM7Oxsq+tHR0fLvelXBI6MjLR6fxaPJyeEEieEEieEEieEEieEEieEEieE6nS73WovR2BRLPhLUz05IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IZQ4IVTTrwBc8Cv7gMHz5IRQ4oRQ4oRQ4oRQ4oRQ4oRQ/wAj3eVzPh6F+gAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"# take a test digit\n",
"test_digit = X[12121]\n",
"plot_digit(test_digit)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "e9622d3b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"4\n"
]
}
],
"source": [
"# see label for test digit\n",
"print(y[12121])"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "afd7df0b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[4]\n"
]
}
],
"source": [
"# see prediction for test digit\n",
"print(classifier.predict([X[12121]]))"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "3591ea2c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[-0.27831745, 5.82217802, 0.72414032, 2.85240395, 9.30320665,\n",
" 3.83670072, 4.8744213 , 7.20637122, 1.74812151, 8.27550294]])"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# see propability for all classes\n",
"classifier.decision_function([X[12121]])"
]
},
{
"cell_type": "code",
"execution_count": 30,
"id": "21c1ce01",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=uint8)"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# see the classes to understand which received which score\n",
"classifier.classes_"
]
},
{
"cell_type": "markdown",
"id": "62982f84",
"metadata": {},
"source": [
"### Evaluation"
]
},
{
"cell_type": "code",
"execution_count": 31,
"id": "e257d6fa",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy Train 100.0\n"
]
}
],
"source": [
"# trainings accuracy\n",
"wrong_images = X_train[(classifier.predict(X_train)-y_train) != 0]\n",
"percentage = ((1-len(wrong_images)/len(X_train)) * 100)\n",
"print(\"Accuracy Train \" + str(percentage))"
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "160c355e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy Test 58.92989985693848\n"
]
}
],
"source": [
"# test accuracy\n",
"wrong_images = X_test[(classifier.predict(X_test)-y_test) != 0]\n",
"percentage = ((1-len(wrong_images)/len(X_test)) * 100)\n",
"print(\"Accuracy Test \" + str(percentage))"
]
},
{
"cell_type": "markdown",
"id": "5ca9eb13",
"metadata": {},
"source": [
"Accuracy is strongly influenced by the distribution of the classes in the test data."
]
},
{
"cell_type": "markdown",
"id": "7e1d98d0",
"metadata": {},
"source": [
"#### Cross Validation\n",
"[Find more information on cross validation here.](https://scikit-learn.org/stable/modules/cross_validation.html#cross-validation)"
]
},
{
"cell_type": "code",
"execution_count": 33,
"id": "bf3fe38d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0.67647059 0.63636364 0.84848485]\n"
]
}
],
"source": [
"# cross validation score\n",
"from sklearn.model_selection import cross_val_score\n",
"\n",
"print(cross_val_score(classifier, X_train, y_train, cv=3, scoring=\"accuracy\"))"
]
},
{
"cell_type": "code",
"execution_count": 34,
"id": "ef410d43",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1 0 1 1 9 9 1 3 1 4 3 1 3 6 1 7 1 9 1 9 4 0 9 1 1 2 1 3 7 1 1 1 1 9 0 1 6\n",
" 0 7 6 1 8 1 9 1 9 1 1 1 3 1 0 7 1 4 8 0 9 4 1 4 1 6 0 6 5 6 1 1 0 1 7 1 6\n",
" 3 0 1 1 1 7 6 0 2 6 7 8 1 9 0 4 6 7 4 6 8 0 7 8 3 1]\n"
]
}
],
"source": [
"# prediction of classifier\n",
"from sklearn.model_selection import cross_val_predict\n",
"\n",
"y_train_pred = cross_val_predict(classifier, X_train, y_train, cv=3)\n",
"print(y_train_pred)"
]
},
{
"cell_type": "markdown",
"id": "b5d581d2",
"metadata": {},
"source": [
"#### Precision"
]
},
{
"cell_type": "code",
"execution_count": 35,
"id": "6c6c13b2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.8456190476190476"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sklearn.metrics import precision_score\n",
"\n",
"precision_score(y_train, y_train_pred, average='weighted')"
]
},
{
"cell_type": "markdown",
"id": "ad953977",
"metadata": {},
"source": [
"#### Recall"
]
},
{
"cell_type": "code",
"execution_count": 36,
"id": "6f9f5706",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.72"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sklearn.metrics import recall_score\n",
"\n",
"recall_score(y_train, y_train_pred, average='weighted')"
]
},
{
"cell_type": "markdown",
"id": "c5d15006",
"metadata": {},
"source": [
"#### F1 Score"
]
},
{
"cell_type": "code",
"execution_count": 37,
"id": "4c6a0676",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.7283140672193305"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sklearn.metrics import f1_score\n",
"\n",
"f1_score(y_train, y_train_pred, average='weighted')"
]
},
{
"cell_type": "markdown",
"id": "29f5d5e2",
"metadata": {},
"source": [
"#### Confusion Matrix"
]
},
{
"cell_type": "code",
"execution_count": 38,
"id": "db5092b9",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[12 1 0 0 0 0 0 0 0 0]\n",
" [ 0 14 0 0 0 0 0 0 0 0]\n",
" [ 0 2 2 0 0 0 0 1 0 1]\n",
" [ 0 4 0 7 0 0 0 0 0 0]\n",
" [ 0 4 0 0 6 0 1 0 0 0]\n",
" [ 0 4 0 0 0 1 0 0 0 0]\n",
" [ 0 2 0 0 0 0 9 0 0 0]\n",
" [ 0 2 0 0 0 0 0 8 0 0]\n",
" [ 0 2 0 0 0 0 0 0 5 1]\n",
" [ 0 1 0 0 1 0 1 0 0 8]]\n"
]
}
],
"source": [
"# confusing matrix\n",
"from sklearn.metrics import confusion_matrix\n",
"\n",
"print(confusion_matrix(y_train, y_train_pred))"
]
},
{
"cell_type": "code",
"execution_count": 39,
"id": "9b9b93f7",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[0.92307692 0.07692308 0. 0. 0. 0.\n",
" 0. 0. 0. 0. ]\n",
" [0. 1. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. ]\n",
" [0. 0.33333333 0.33333333 0. 0. 0.\n",
" 0. 0.16666667 0. 0.16666667]\n",
" [0. 0.36363636 0. 0.63636364 0. 0.\n",
" 0. 0. 0. 0. ]\n",
" [0. 0.36363636 0. 0. 0.54545455 0.\n",
" 0.09090909 0. 0. 0. ]\n",
" [0. 0.8 0. 0. 0. 0.2\n",
" 0. 0. 0. 0. ]\n",
" [0. 0.18181818 0. 0. 0. 0.\n",
" 0.81818182 0. 0. 0. ]\n",
" [0. 0.2 0. 0. 0. 0.\n",
" 0. 0.8 0. 0. ]\n",
" [0. 0.25 0. 0. 0. 0.\n",
" 0. 0. 0.625 0.125 ]\n",
" [0. 0.09090909 0. 0. 0.09090909 0.\n",
" 0.09090909 0. 0. 0.72727273]]\n"
]
}
],
"source": [
"cm = confusion_matrix(y_train, y_train_pred, normalize='true')\n",
"print(cm)"
]
},
{
"cell_type": "code",
"execution_count": 40,
"id": "d0c229f1",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import seaborn as sn"
]
},
{
"cell_type": "code",
"execution_count": 41,
"id": "634396e4",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjEAAAGtCAYAAADnIyVRAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAABQ/UlEQVR4nO3deXhU5d3/8fc3G8giazJsMaLgguIKoqCyFxQFFHF70IJFHp+fVrQiUq3Qggtai/uWKqhFsdhSHwQLPiCUCoqiyA6KiIQt7CiKhszcvz8yTgkkmURn5sxhPq/rmss5c+455zO3CfPNfZ/FnHOIiIiI+E2a1wFEREREfgoVMSIiIuJLKmJERETEl1TEiIiIiC+piBERERFfUhEjIiIivqQiRkREROLOzMab2TYzW17OejOzJ8xsrZktNbOzom1TRYyIiIgkwktAzwrWXwS0DD+GAM9G26CKGBEREYk759w8YFcFTfoAr7gSHwB1zaxxRdvMiGXAWAoEAr67lPD69eu9jlAlRx11lNcRRESkNEvozsxi+V3735SMoPwo3zmXX4X3NwUKDlreGH5tS3lvSNoiRkRERPwjXLBUpWj52VTEiIiIpCizhA78RLMJyD1ouVn4tXLpmBgREZEUZWYxe8TAVOD68FlK5wJ7nXPlTiWBRmJEREQkAcxsEtAJaGhmG4FRQCaAc+454G3gYmAt8B0wKNo2VcSIiIikqEROJznnromy3gE3V2WbKmJERERSVFqav48q8Xd6ERERSVkaiREREUlRSXZ2UpWpiBEREUlRfi9iNJ0kIiIivqSRGBERkRTl95EYFTEiIiIpyu9FjKaTRERExJc0EiMiIpKiNBKTRDp37sz8+fP54IMP+PWvf33Y+mbNmvG3v/2NOXPmMGXKFBo3bgzAKaecwvTp0/nXv/7FnDlz6NOnT1xzzp8/nz59+nDppZcyfvz4w9YXFRUxfPhwLr30UgYMGMCmTSX3v5o+fTpXXnll5HHmmWeyevVqvv3221Kvd+rUiYcffjiun6E88+bNo0ePHnTv3p38/ITezPQnU+b481teUOZE8Fte8GfmiqSlpcXs4QnnXFI+cnJyXFUejRo1cl9++aVr27ata9q0qVu+fLk7//zzS7X53//9X3fLLbe4nJwcd/nll7vJkye7nJwcd+6557p27dq5nJwc17p1a7d161bXokWLKu0/JyfHfffdd1Ef33zzjevSpYv77LPP3N69e90ll1zili1bVqrNhAkT3N133+2+++47N2XKFHfLLbcctp0lS5a4Ll26lLmPPn36uH//+99Rs8RacXGx69q1q9uwYYP74Ycf3KWXXuo+//zzmO8nlpQ5/vyW1zllTgS/5XUuYZkT+l1bq1YtF6tHorM75+I3EmNmJ5nZXWb2RPhxl5mdHK/9nXXWWXz55Zd89dVXHDhwgDfffJOePXuWanPCCSfw3nvvAfDee+9F1q9bt44vv/wSgMLCQnbs2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GTx4MMFgkH79+tGyZUsvolTaa6+9RqdOnWjYsCEFBQWMGjWK8ePHex2rXH7sY2WOP7/lBWVOBL/lBX9mjsbvIzHmXExnbUo2avYiMME5914Z615zzl1bic3EPlic+e2HIR7/70VE5GdJ6BfJ2WefHbMvgo8//jjhX4JxGYlxzv2qgnWVKWBEREREKqTbDoiIiKQov80gHEpFjIiISIry6tToWPF3ehEREUlZGokRERFJUZpOEhEREV/SdJKIiIiIBzQSIyIikqI0nSQiIiK+5PciRtNJIiIi4ksaiREREUlROrBXREREfMnMYvaoxL56mtkaM1trZiPKWH+Mmc0xs8VmttTMLo62TRUxIiIiEldmlg48DVwEtAKuMbNWhzT7HTDZOXcmcDXwTLTtajpJREQkRSVwOukcYK1zbh2Amb0O9AFWHtTGAUeHn9cBNkfbqIqYGFqwYIHXEark/fff9zpClZ133nleRxCJiW3btnkdoUpycnK8jlBlfutjSHw/x/LsJDMbAgw56KV851x++HlToOCgdRuBdods4vfAO2b2a6Am0C3aPlXEiIiIyM8WLljyozYs3zXAS865P5nZecBfzOxU51yovDeoiBEREUlRCbxOzCYg96DlZuHXDvYroCeAc+59M6sONATKHVLTgb0iIiIpKi0tLWaPKD4CWppZczPLouTA3amHtNkAdAUws5OB6sD2CvP/pE8tIiIiUknOuWLgFmAmsIqSs5BWmNloM+sdbnYHcKOZLQEmAQOdc66i7Wo6SUREJEUl8rYDzrm3gbcPeW3kQc9XAh2qsk0VMSIiIilKV+wVERER8YBGYkRERFKU3+9irSJGREQkRamIEREREV/SMTEiIiIiHtBIjIiISIrSdJKIiIj4kqaTRERERDyQUiMx8+bN4/777ycUCtG/f3+GDBkS/U1xtnTpUl577TVCoRAXXnghl1xySan17777Lu+++y5mRvXq1Rk4cCBNmzZl3bp1TJgwIdKub9++nH322cr7EyTjz0U0fsvst7yQnJkXLlzI448/TigU4pJLLmHAgAGl1n/66ac88cQTrFu3jlGjRtG5c2cAPvnkE5588slIuw0bNjBq1CguvPDChOY/lPrYe36fTrIotyXwU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2CuSzMIjLhdRclM5KLlPz6nOuS/Dd33e65xra2bVgPlm9g4ldwk/EWhFyVVxVwLjD9luNvBn4MLwtuo753aZ2XPAPufcI+F2rwGPOufeC19OfSZwMjAKeM85N9rMegG/qsLHWg1cEL5adjfgAaBfeN05wKnAd8BHZjadkpssXgV0cM4dMLNngP8CXqnCPkUkhaiIEfHWUQfdouHflNx7qj3woXPuy/DrvwBO+/F4F6AO0BK4EJjknAsCm83s3TK2fy4w78dtOed2lZOjG9AqfGsAgKPDdyO/kJL7w+Ccm25mu6vw2epQckuHloADMg9a93/OuZ0AZjYFOJ+SS8+fTUlRA3AUsK0K+xORFKMiRsRb+51zZxz8QvgL/NuDXwJ+7ZybeUi7i2OYIw041zn3fRlZfqoxwBzn3GXhKay5B6079H4njpLP+bJz7rc/Z6cikjp0TIxI8psJ/I+ZZQKY2QnhG/3NA64KHzPTGOhcxns/AC40s+bh99YPv/4NUPugdu9QcsNDwu3OCD+dB1wbfu0ioF4VctcBNoWfDzxkXXczqx++c3hfYD4wG7jioLsE1zezvCrsT0RSjIoYkeT3AiXHu3xiZsuB5ykZRf0H8Hl43SvA+4e+0Tm3HRgCTDGzJcBfw6veAi778cBe4FagTfjA4ZX85yypP1BSBK2gZFppQwU5l5rZxvBjHPAw8KCZLebwUd8Pgb8DS4G/O+cWhc+m+h3wjpktBf6PkruMi4iUSXexFhEREV/SSIyIiIj4kooYERER8SUVMSIiIuJLKmJERETEl1TEiIiIiC+piBERERFfUhEjIiIivvT/AQE7UNRiNg2NAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 720x504 with 2 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"set_digits = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }\n",
"\n",
"df_cm = pd.DataFrame(cm, index=set_digits, columns=set_digits)\n",
"plt.figure(figsize = (10,7))\n",
"sn_plot = sn.heatmap(df_cm, annot=True, cmap=\"Greys\")\n",
"plt.ylabel(\"True Label\")\n",
"plt.xlabel(\"Predicted Label\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1ef938c5",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "f55ba3ed",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "9238e672",
"metadata": {},
"source": [
"## Train kNN Classifer\n",
"__TODO__"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a8fbef47",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}