Book Image

Python Data Science Essentials

Book Image

Python Data Science Essentials

Overview of this book

The book starts by introducing you to setting up your essential data science toolbox. Then it will guide you across all the data munging and preprocessing phases. This will be done in a manner that explains all the core data science activities related to loading data, transforming and fixing it for analysis, as well as exploring and processing it. Finally, it will complete the overview by presenting you with the main machine learning algorithms, the graph analysis technicalities, and all the visualization instruments that can make your life easier in presenting your results. In this walkthrough, structured as a data science project, you will always be accompanied by clear code and simplified examples to help you understand the underlying mechanics and real-world datasets.
Table of Contents (13 chapters)

Ensemble strategies


Until now, we have seen single learning algorithms of growing complexity. Ensembles represent an effective alternative since they tend to achieve better predictive accuracy by combining or chaining the results from different data samples, algorithms settings, and types.

They divide themselves into two branches. According to the method used, they ensemble predictions:

  • Averaging algorithms: These predict by averaging the results of various parallel estimators. The variations in the estimators provide further division into four families: pasting, bagging, subspaces, and patches.

  • Boosting algorithms: These predict by using a weighted average of sequential aggregated estimators.

Before delving into some examples for both classification and regression, we will provide you with the steps to load a new dataset for classification, the Covertype dataset. It features a large number of 30×30 meter patches of forest in the US. The data pertaining to them is collected for the task of...