Knowledge Graph — Coursera Notes › Academic disciplines › Information Technology / Computer Science › Artificial Intelligence › Machine Learning & Data
Train/test split
concept · part of Machine Learning & Data
A technique to separate data into training and test sets to evaluate model performance on unseen data.
The dataset is split into training and test sets using sklearn's train_test_split with a test size of 0.2 and random_state=42 for reproducibility. The training set is used to fine-tune the model, and the test set is used for evaluation.
train_data, test_data = train_test_split(data, test_size=0.2, random_state=42)
Common parameters: test_size (proportion of test set), random_state (seed for reproducibility).
Connections
- Prerequisite of Accuracy
This is the text view of an interactive 3D knowledge graph — open this page with JavaScript enabled to explore it visually.