Book Image

Python Data Mining Quick Start Guide

By : Nathan Greeneltch
Book Image

Python Data Mining Quick Start Guide

By: Nathan Greeneltch

Overview of this book

Data mining is a necessary and predictable response to the dawn of the information age. It is typically defined as the pattern and/ or trend discovery phase in the data mining pipeline, and Python is a popular tool for performing these tasks as it offers a wide variety of tools for data mining. This book will serve as a quick introduction to the concept of data mining and putting it to practical use with the help of popular Python packages and libraries. You will get a hands-on demonstration of working with different real-world datasets and extracting useful insights from them using popular Python libraries such as NumPy, pandas, scikit-learn, and matplotlib. You will then learn the different stages of data mining such as data loading, cleaning, analysis, and visualization. You will also get a full conceptual description of popular data transformation, clustering, and classification techniques. By the end of this book, you will be able to build an efficient data mining pipeline using Python without any hassle.
Table of Contents (9 chapters)

Scikit-learn Estimator API

One of the reasons scikit-learn is so popular is its ease of use. There are only a few, well thought-out API designs in the library and they are applied in a sweeping manner across many different methods and routines. This chapter will make use of the Estimator API. It's extremely straightforward, and, once you understand how to use it, you can try our new regression and classification estimator methods with ease, because they all work in the same way (in other words, they all make use of the Estimator API).

The steps are given as follows:

  1. Import the module
  2. Instantiate the estimator object (regression or classification model in the following diagram)
  3. Fit the model-to-map input training data (X_train in the following diagram) to the ground truth y_train labels
  4. Predict y_pred on the new test data (X_test in the following diagram)

It can also be...