A security data scientist is building a network intrusion detection model. She splits her labeled dataset into three subsets before training. What is the correct purpose of each split?
- A.A. Train: initial testing; Validation: model building; Test: final deployment dataset
- B.C. Train and Validation are used identically; Test is used for model training
- C.B. Train: the model learns patterns from this set; Validation: used during training to tune hyperparameters and detect overfitting; Test: held-out final evaluation on unseen data to estimate real-world performance
- D.D. All three splits are used simultaneously during the gradient descent optimization process
Why C is correct
The train/validation/test split is a foundational ML practice: the training set trains model parameters (weights). The validation set is used during model development to tune hyperparameters (e.g., learning rate, tree depth) and monitor for overfitting without contaminating the final evaluation. The test set is a completely held-out set used ONLY for final performance estimation - it simulates how the model performs on truly unseen data. Contaminating the test set by using it for hyperparameter tuning inflates apparent performance.
Know someone studying for AI Security Fundamentals? Send them this one.