Session Ready
Exercise

Varying hyperparameters

The number of iterations of training, and the size of hidden layers are two primary hyperparameters that can be varied when working with a MLP classifier. In this exercise, you will vary both separately and note how performance in terms of accuracy and AUC of the ROC curve may vary.

X_train, y_train, X_test, y_test are available in your workspace. Features have already been standardized using a StandardScaler(). pandas as pd, numpy as np are also available in your workspace.

Instructions 1/2
undefined XP
  • 1
    • Create a MLP classifier for each configuration of max_iter.
    • Calculate accuracy and AUC using roc_auc_score() on y_score.
    • 2
      • Create 3 MLP classifiers with 4, 8, and 16 units (using (4, ), (8, ), etc.)
      • Derive accuracy and AUC of ROC for each.