Skip to Main Content
Python Data Science Essentials
book

Python Data Science Essentials

by Alberto Boschetti
April 2015
Beginner content levelBeginner
258 pages
5h 48m
English
Packt Publishing
Content preview from Python Data Science Essentials

Cross-validation

If you have run the previous experiment, you may have realized that:

  1. Both the validation and test results vary as samples are different
  2. The chosen hypothesis is often the best one, but this is not always the case

Unfortunately, relying on the validation and testing phases of samples brings uncertainty along with a strong reduction of the learning examples for training (the fewer the examples, the more the variance of the obtained model).

A solution is to use cross-validation, and Scikit-learn offers a complete module for cross-validation and performance evaluation (sklearn.cross_validation).

By resorting to cross-validation, you'll just need to separate your data into a training and test set, and you will be able to use the training ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Data Science Essentials - Second Edition

Python Data Science Essentials - Second Edition

Luca Massaron, Alberto Boschetti
Python Data Science Essentials - Third Edition

Python Data Science Essentials - Third Edition

Alberto Boschetti, Luca Massaron, Pietro Marinelli, Matteo Malosetti
Python: End-to-end Data Analysis

Python: End-to-end Data Analysis

Phuong Vothihong, Martin Czygan, Ivan Idris, Magnus Vilhelm Persson, Luiz Felipe Martins

Publisher Resources

ISBN: 9781785280429Supplemental Content