evaluating machine-learning models in the three examples presented in we split the data into training seta validation setand test set the reason not to evaluate the models on the same data they were trained on quickly became evidentafter just few epochsall three models began to overfit that istheir performance on never-before-seen data started stalling (or worseningcompared to their performance on the training data--which always improves as training progresses in machine learningthe goal is to achieve models that generalize--that perform well on never-before-seen data--and overfitting is the central obstacle you can only control that which you can observeso it' crucial to be able to reliably measure the generalization power of your model the following sections look at strategies for mitigating overfitting and maximizing generalization in this sectionwe'll focus on how to measure generalizationhow to evaluate machine-learning models trainingvalidationand test sets evaluating model always boils down to splitting the available data into three setstrainingvalidationand test you train on the training data and evaluate your model on the validation data once your model is ready for prime timeyou test it one final time on the test data you may askwhy not have two setsa training set and test setyou' train on the training data and evaluate on the test data much simplerthe reason is that developing model always involves tuning its configurationfor examplechoosing the number of layers or the size of the layers (called the hyperparameters of the modelto distinguish them from the parameterswhich are the network' weightsyou do this tuning by using as feedback signal the performance of the model on the validation data in essencethis tuning is form of learninga search for good configuration in some parameter space as resulttuning the configuration of the model based on its performance on the validation set can quickly result in overfitting to the validation seteven though your model is never directly trained on it central to this phenomenon is the notion of information leaks every time you tune hyperparameter of your model based on the model' performance on the validation setsome information about the validation data leaks into the model if you do this only oncefor one parameterthen very few bits of information will leakand your validation set will remain reliable to evaluate the model but if you repeat this many times--running one experimentevaluating on the validation setand modifying your model as result--then you'll leak an increasingly significant amount of information about the validation set into the model at the end of the dayyou'll end up with model that performs artificially well on the validation databecause that' what you optimized it for you care about performance on completely new datanot the validation dataso you need to use completely differentnever-before-seen dataset to evaluate the modelthe test dataset your model shouldn' have had access to any information about the test seteven indirectly licensed to