Test Data
noun
say it: “TEST DAY-tuh” /ˈtɛst ˈdeɪtə/
In machine learning, examples kept away from a model while it learns, used afterward to check how well it guesses on new data.
What is test data in machine learning?
Test data is the examples held back while a model learns, so its guesses can be scored on examples it has never seen. A good score on the training data alone proves little.
from sklearn.model_selection import train_test_split
# X: the features, y: the labels; a quarter of the rows are held back as test data
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=42)
In a sentence
- “She kept a quarter of the days as test data.”
- “The model was scored on test data it had never seen.”
Level: Apprentice · More AI Basics terms at this level
Updated