liveBook · Manning

Evaluation dataset

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

A validation dataset is a portion of data reserved for evaluating and tuning a model during development rather than fitting its parameters.

A validation set is a portion of the training data held aside during model development. It evaluates partial models while training and helps identify when continued fitting begins to overfit. section 5.3.1

Use the validation set as part of an early-stopping workflow:

  • Reserve a fraction of the training data for validation. section 5.3.1
  • Evaluate the partial model on that data after each training iteration and record its metric. section 5.3.1
  • Track patience—the number of iterations since the last improvement—and stop when the metric fails to improve for the configured interval. section 5.3.1 section 5.4.4
  • Reserve the validation data separately from the test data when using a train/test split, reducing the data available for fitting. section 5.4.4

Gradient boosting

A GradientBoostingClassifier can reserve 20% of its training data with validation_fraction=0.2 and stop after 10 iterations without improvement using n_iter_no_change=10. XGBoost instead receives validation samples and targets through eval_set, monitors eval_metric, and records the best iteration for prediction. section 5.3.1 section 5.4.4

Figure 5.8 A process flow chart describing how early stopping works in GBDTs

Use the process flow chart to follow validation-based early stopping from data reservation through termination. section 5.3.1

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

How deep it goes
Explains data reservation, repeated evaluation, patience, stopping, and best-iteration selection, without deriving optimization internals.
Examples
Demonstrates validation_fraction, n_iter_no_change, eval_set, eval_metric, and train-validation-test splitting.
What it assumes
Assumes iterative model training and evaluation metrics while teaching validation splitting and patience from first principles.
What you can do after
Apply it via Scikit-learn or XGBoost to monitor validation performance and stop training before validation error worsens.
How it connects
Connects validation sets with early stopping, overfitting, gradient boosting, cross-validation, evaluation metrics, and test sets.

Also explained in

Compare how 27 books explain evaluation dataset →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.