Testing Machine Learning Algorithms
Testing Machine Learning Algorithms
➢ In machine learning, model testing is referred to as the process where the performance of
a fully trained model is evaluated on a testing set.
✓ The program is broken down into blocks, and each element (unit) is tested
separately.
✓To Check whether your model breaks and test for previously encountered bugs.
• Integration tests:
✓This type of testing observes how multiple components of the program work
together. ✓To Check whether the different components work with each other within
your machine learning.
Training & Testing
• To use a training set to train the model. Then, to evaluate the performance of the model, you
use two sets of data:
Validation set:
• Having only a training set and a testing set is not enough if you do many rounds of
hyper parameter-tuning (which is always).
• you can select a small validation data set to evaluate a model.
• Only after you get maximum accuracy on the validation set, you make the testing set
come into the game.
Test set (or holdout set):
• Your model might fit the training dataset perfectly well.
• But where are the guarantees that it will do equally well in real-life?
• In order to assure that, you select samples for a testing set from your training set —
examples that the machine hasn’t seen before.
• Your test set should be large enough to provide statistically meaningful results and
be representative of the data set as a whole.