4. Evaluating Your Model with Cross-Validation Using Keras Wrappers
Activity 4.01: Model Evaluation Using Cross-Validation for an Advanced Fibrosis Diagnosis Classifier
In this activity, we are going to use what we learned in this topic to train and evaluate a deep learning model using k-fold cross-validation
. We will use the model that resulted in the best test error rate from the previous activity and the goal will be to compare the cross-validation error rate with the training set/test set approach error rate. The dataset we will use is the hepatitis C dataset, in which we will build a classification model to predict which patients get advanced fibrosis. Follow these steps to complete this activity:
- Load the dataset and print the number of records and features in the dataset, as well as the number of possible classes in the target dataset:
# Load the dataset import pandas as pd X = pd.read_csv('../data/HCV_feats.csv') y = pd.read_csv('../data/HCV_target...