• ↑↓ to navigate
  • ↵ to open
  • ⟶ to select
  • ⌘ ⌥ ↵ to open in a panel
  • ←→ to navigate
  • esc to dismiss
⌘ '
keyboard shortcuts

The Problem

Models can memorize training data and appear perfect, but fail on new data — we need a way to estimate real-world performance.

Core Idea

Dividing a dataset into separate subsets for training (learning parameters) and testing (evaluating generalization) to detect overfitting.

How It Works

  1. Randomly shuffle data to remove ordering effects
  2. Split: typically 70-80% train, 20-30% test (or 60-20-20 train-val-test)
  3. Train model exclusively on training set
  4. Evaluate model exclusively on test set (never seen during training)
  5. Use test performance as estimate of real-world performance

Visual Explanation

G Full Dataset Full Dataset Shuffle Shuffle Full Dataset->Shuffle Split Split Shuffle->Split Training Set (70-80%) Training Set (70-80%) Split->Training Set (70-80%) Test Set (20-30%) Test Set (20-30%) Split->Test Set (20-30%) Training Set Training Set Train Model Train Model Training Set->Train Model Evaluate on Test Evaluate on Test Train Model->Evaluate on Test Test Set Test Set Test Set->Evaluate on Test

Key Properties

  • Generalization estimate: test performance approximates real-world performance
  • Independence: test set must never influence training (no leakage)
  • Randomness: different splits give different performance estimates
  • Stratification: preserve class proportions in classification tasks

Semantic Network

semantic_Train_Test_Split THIS Train Test Split REL1 Related Concept THIS--REL1 related REL2 Builds Into THIS--REL2 builds into

Connections

Edge Cases & Gotchas

  • Data leakage: information from test set inadvertently used during training
  • Small datasets: single split gives high-variance performance estimates
  • Non-IID data: time series or clustered data require special splitting strategies
  • Test set overfitting: tuning hyperparameters on test set invalidates the estimate