Towards the end of "3 Introduction to general Machine Learning" a digit classification task was discussed.
Your task is to build a similar digit recongnizer, harnessing a DecisionTreeClassifier rather than a GaussianNB classifier. That includes:

  1. Importing the dataset
  2. Perform train-test-split
  3. Instantiate and train the classifier
    • Find and tweak the hyperparameter to gain optimal results (try extreme values and see their influence)
  4. Print the confusion matrix (from sklearn.metrics import confusion_matrix) to visualize the model's weaknesses.
  5. Compare the result to the result achieved with the GaussianNB classifier.

Import the dataset

Reminder: you find it here: from sklearn.datasets import load_digits


In [ ]:

Train-test-split; Classifier training


In [ ]:

Confusion matrix


In [ ]: