Reviewing traditional model interpretation methods
To explore as many model classes and interpretation methods as possible, we will fit the data into regression and classification models.
Predicting minutes delayed with various regression methods
To compare and contrast regression methods, we will first create a dictionary named reg_models
. Each model is its own dictionary and the function that creates it is the model
attribute. This structure will be used later to neatly store the fitted model and its metrics. Model classes in this dictionary have been chosen to represent several model families and to illustrate important concepts that we will discuss later:
reg_models = {
#Generalized Linear Models (GLMs)
'linear':{'model': linear_model.LinearRegression()},
'linear_poly':{
'model':make_pipeline(
PolynomialFeatures(degree=2),
linear_model.LinearRegression(fit_intercept=False)
...