Cross-validation is a technique used to assess a model's performance by splitting the dataset into multiple subsets. It helps provide a more accurate estimate of how the model will generalize to unseen data by training and evaluating the model on different subsets in multiple iterations.
Example:
Performing 5-fold cross-validation involves dividing the dataset into five subsets. The model is trained on four subsets and tested on the remaining one, repeating the process five times with a different test subset each time.