<jupyter_start><jupyter_text>MNIST<jupyter_code>import numpy as np
import pandas as pd

from sklearn.naive_bayes import GaussianNB
from sklearn.dummy import DummyClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.svm import SVC
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model import LogisticRegression

import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>Global config<jupyter_code># TODO<jupyter_output><empty_output><jupyter_text>Load data<jupyter_code>mnist_28x28_train = np.load("mnist_28x28_train.npy")
mnist_8x8_train = np.load("mnist_8x8_train.npy")
train_labels = np.load("train_labels.npy")

mnist_28x28_test = np.load("mnist_28x28_test.npy")
mnist_8x8_test = np.load("mnist_8x8_test.npy")<jupyter_output><empty_output><jupyter_text>Helpers<jupyter_code># TODO<jupyter_output><empty_output><jupyter_text>Data exploration  Question 1Hint: `plt.imshow`<jupyter_code># TODO<jupyter_output><empty_output><jupyter_text>Data Preparations  Question 1<jupyter_code># TODO<jupyter_output><empty_output><jupyter_text>Experiments  Question 1<jupyter_code># TODO<jupyter_output><empty_output><jupyter_text>Question 2<jupyter_code># TODO<jupyter_output><empty_output><jupyter_text>Question 3<jupyter_code># TODO<jupyter_output><empty_output><jupyter_text>Question 4<jupyter_code>#TODO<jupyter_output><empty_output><jupyter_text>Question 5<jupyter_code>#TODO<jupyter_output><empty_output><jupyter_text>Question 6<jupyter_code>#TODO
prediction = np.array([-1] * len(mnist_8x8_test)) #TODO replace this with you own prediction
pd.DataFrame(prediction).to_csv("GROUP_classes_problem_mnist.txt", index=False, header=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10372960372960373, 'fraction_numerical': 0.020396270396270396, 'mean_word_length': 13.675213675213675, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '12', 'dir': 'jupyter-structured-clean-dedup', 'id': '85172', 'license': 'Apache-2.0', 'n_tokens_mistral': 701, 'n_tokens_neox': 676, 'n_words': 81, 'path': 'Final/MNIST/GROUP_problem_mnist.ipynb', 'repo_name': 'Timo9Madrid7/CSE2510_WeeklyLab', 'size': '1716'}