Generalization Error: Elie Kawerk
Generalization Error: Elie Kawerk
Elie Kawerk
Data Scientist
Supervised Learning - Under the Hood
Supervised Learning: y = f(x), f is unknown.
Elie Kawerk
Data Scientist
Estimating the Generalization Error
How do we estimate the generalization error of a model?
noise is unpredictable.
Hold-Out CV.
for ex: decrease max depth, increase min samples per leaf, ...
for ex: increase max depth, decrease min samples per leaf, ...
CV MSE: 20.51
Elie Kawerk
Data Scientist
Advantages of CARTs
Simple to understand.
Simple to interpret.
Easy to use.
# Define a list called classifier that contains the tuples (classifier_name, classifier)
classifiers = [('Logistic Regression', lr),
('K Nearest Neighbours', knn),
('Classification Tree', dt)]
# Fit 'vc' to the traing set and predict test set labels
vc.fit(X_train, y_train)
y_pred = vc.predict(X_test)