Q13Machine Learning
Question
4 marks
What is cross-validation? Explain k-fold cross-validation.
Answer
Cross-validation evaluates a model's performance on unseen data. K-fold splits data into K equal subsets.
In K-fold cross-validation, the dataset is divided into K partitions. The model is trained on K-1 partitions and tested on the remaining 1 partition. This process is repeated K times, with each partition acting as the test set exactly once. The final performance metric is the average of the K results.