Basic Train/Test Split

easy

Task

Split the iris dataset into training and test sets with 80% for training and 20% for testing. Use random_state=42 for reproducibility.

Why It Matters

Train/test splitting is fundamental to ML - it lets you evaluate how well your model generalizes to unseen data. Without this, you might build a model that memorizes training data but fails on new examples. The 80/20 split is a common starting point.

Instructions

  1. Examine the setup code and data
  2. Modify the code to solve the puzzle
  3. Click Run or press Ctrl+Enter to execute

Command Palette

Search for a command to run...