Question 1: True or false
mediumAI-checkedSupport Vector Machinesimport numpy as np
from sklearn.svm import SVC
X = np.array([[0, 0], [1, 1], [0, 2], [3, 3], [4, 2], [5, 5]], dtype=float)
y = np.array([0, 0, 0, 1, 1, 1])
svm = SVC(kernel="linear", C=1000).fit(X, y)
sv = svm.support_ # indices of the support vectors
svm2 = SVC(kernel="linear", C=1000).fit(X[sv], y[sv])
print(np.allclose(svm.coef_, svm2.coef_),
np.allclose(svm.intercept_, svm2.intercept_))
True or false: the last line prints True True, i.e. retraining on the support vectors alone
gives the same decision boundary.