A machine learning hypothesis is not only determined by the learning algorithm, but also by its hyper-parameters (the parameters of the algorithm that have to be a priori fixed and which cannot be learned during the training process) and the selection of variables to be used to achieve the best learned parameters.
In this section, we will explore how to extend the cross-validation approach to find the best hyper-parameters that are able to generalize to our test set. We will keep on using the handwritten digits dataset offered by the Scikit-learn package. Here's a useful reminder about how to load the dataset:
In: from sklearn.datasets import load_digits digits = load_digits() X, y = digits.data, digits.target
Also, we will keep on using support vector machines as our learning algorithm:
In: from sklearn import svm h = svm.SVC() hp = svm.SVC(probability=True, random_state=1)
This time, we will use two hypotheses. The first hypothesis is just the plain SVC that...