# Tensor-Based Algorithms for Image Classification
## 4 Numerical Results
Note that although more sophisticated methods and architectures for these problems exists--see the (fashion) MNIST website for a ranking--the results show that our tensor-based approaches are competitive with state-of-the-art deep-learning techniques. To understand the numerical results for the MNIST data set (obtained by applying kernel-based MANDy to all 60,000 training images), we analyze the misclassified images, examples of which are displayed in Figure 6a. For misclassified images \(x\), the entries of \(f(x)\), see (29), are often numerically zero, which implies that there is no other image in the training set that is similar enough so that the kernel can pick up the resemblance. Some of the remaining misclassified digits are hard to recognize even for humans. Histograms demonstrating which categories are misclassified most often are shown in Figure 6b. Here, we simply count the instances where an image with label \(i\) was assigned the wrong label \(j\). The digits 2 and 7, as well as 4 and 9, are confused most frequently. Additionally, we wish to visualize what the algorithm detects in the images. To this end, we perform a sensitivity analysis as follows. Starting with an image whose pixel values are constant everywhere (zero or any other value smaller than one, we choose 0.5), we set pixel \((i,j)\) to one and compute \(y=f(x)\) for this image. The process is repeated for all pixels. For each label, we then plot a heat map of the values of \(y\). This tells us which pixels contribute most to the classification of the images. The resulting maps are shown in Figure 6c. Except for the digit 1, the results are highly similar to the images obtained by averaging over all images containing a certain digit. Figure 7 shows examples of misclassified images and the corresponding histogram as well as the results of the sensitivity analysis for the fashion MNIST data set. We see that the images of shirts (6) are most difficult to classify (due to the ambiguity in the category definitions), whereas trousers (1) and bags (8) have the lowest misclassification rates (probably due to their distinctive shapes). In contrast to the MNIST data set, the results of the sensitivity analysis differ widely from the average images. The classifier for coats (4), for instance, \"looks for\" a zipper and coat pockets, which are not visible in the \"average coat\", and the classifier for dresses (3) seems to base the decision on the presence of creases, which are also not distinguishable in the \"average dress\". The interpretation of other classifiers is less clear, e.g., the ones for sandals (5) and sneakers (7) seem to be contaminated by other classes. Comparing the runtimes of both approaches applied to the reduced data sets with 60,000 training images, kernel-based MANDy needs approximately one hour for the construction of the decision function (29). On the other hand, ARR needs less than 10 minutes to compute the coefficient tensor assuming we parallelize Algorithm 2. Figure 6: MNIST classification: (**a**) Images misclassified by kernel-based MANDy described in Section 3.2. The original image is shown in black, the identified label in red, and the correct label in green. (**b**) Histograms illustrating which categories are misclassified most often. The rows represent the correct labels of the misclassified image and the columns the detected labels. (**c**) Visualizations of the learned classifiers showing a heat map of the classification function obtained by applying it to images that differ in one pixel.