Using k-fold cross-validation and validation curves in Python with scikit-learn

  1. If you've not already done so, start the NotebookApp and open the chapter-2- workbook.ipynb file. Scroll down to Subtopic K-fold cross-validation and validation curves.

The training data should already be in the notebook's memory, but let's reload it as a reminder of what exactly we're working with.

  1. Load the data and select the satisfaction_level and last_evaluation features for the training/validation set. We will not use the train-test split this time because we are going to use k-fold validation instead. Run the cell containing the following code:
      df = pd.read_csv('../data/hr-analytics/hr_data_processed.csv') features = ['satisfaction_level', 'last_evaluation'] ...

Get Applied Deep Learning with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.