Evaluating the accuracy using cross-validation

Cross-validation is essential in machine learning. Initially, we split the datasets into a train set and a test set. Next, in order to construct a robust classifier, we repeat this procedure, but we need to avoid overfitting the model. Overfitting indicates that we get excellent prediction results for the train set, but very poor results for the test set. Overfitting causes poor generalization of the model.

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.