Book description
100 recipes that teach you how to perform various machine learning tasks in the real world
About This Book
 Understand which algorithms to use in a given context with the help of this exciting recipebased guide
 Learn about perceptrons and see how they are used to build neural networks
 Stuck while making sense of images, text, speech, and real estate? This guide will come to your rescue, showing you how to perform machine learning for each one of these using various techniques
Who This Book Is For
This book is for Python programmers who are looking to use machinelearning algorithms to create realworld applications. This book is friendly to Python beginners, but familiarity with Python programming would certainly be useful to play around with the code.
What You Will Learn
 Explore classification algorithms and apply them to the income bracket estimation problem
 Use predictive modeling and apply it to realworld problems
 Understand how to perform market segmentation using unsupervised learning
 Explore data visualization techniques to interact with your data in diverse ways
 Find out how to build a recommendation engine
 Understand how to interact with text data and build models to analyze it
 Work with speech data and recognize spoken words using Hidden Markov Models
 Analyze stock market data using Conditional Random Fields
 Work with image data and build systems for image recognition and biometric face recognition
 Grasp how to use deep neural networks to build an optical character recognition system
In Detail
Machine learning is becoming increasingly pervasive in the modern datadriven world. It is used extensively across many fields such as search engines, robotics, selfdriving cars, and more.
With this book, you will learn how to perform various machine learning tasks in different environments. We'll start by exploring a range of reallife scenarios where machine learning can be used, and look at various building blocks. Throughout the book, you'll use a wide variety of machine learning algorithms to solve realworld problems and use Python to implement these algorithms.
You'll discover how to deal with various types of data and explore the differences between machine learning paradigms such as supervised and unsupervised learning. We also cover a range of regression techniques, classification algorithms, predictive modeling, data visualization techniques, recommendation engines, and more with the help of realworld examples.
Style and approach
You will explore various reallife scenarios in this book where machine learning can be used, and learn about different building blocks of machine learning using independent recipes in the book.
Table of contents

Python Machine Learning Cookbook
 Table of Contents
 Python Machine Learning Cookbook
 Credits
 About the Author
 About the Reviewer
 www.PacktPub.com
 Preface

1. The Realm of Supervised Learning
 Introduction
 Preprocessing data using different techniques
 Label encoding
 Building a linear regressor
 Computing regression accuracy
 Achieving model persistence
 Building a ridge regressor
 Building a polynomial regressor
 Estimating housing prices
 Computing the relative importance of features
 Estimating bicycle demand distribution

2. Constructing a Classifier
 Introduction
 Building a simple classifier
 Building a logistic regression classifier
 Building a Naive Bayes classifier
 Splitting the dataset for training and testing
 Evaluating the accuracy using crossvalidation
 Visualizing the confusion matrix
 Extracting the performance report
 Evaluating cars based on their characteristics
 Extracting validation curves
 Extracting learning curves
 Estimating the income bracket
 3. Predictive Modeling

4. Clustering with Unsupervised Learning
 Introduction
 Clustering data using the kmeans algorithm
 Compressing an image using vector quantization
 Building a Mean Shift clustering model
 Grouping data using agglomerative clustering
 Evaluating the performance of clustering algorithms
 Automatically estimating the number of clusters using DBSCAN algorithm
 Finding patterns in stock market data
 Building a customer segmentation model

5. Building Recommendation Engines
 Introduction
 Building function compositions for data processing
 Building machine learning pipelines
 Finding the nearest neighbors
 Constructing a knearest neighbors classifier
 Constructing a knearest neighbors regressor
 Computing the Euclidean distance score
 Computing the Pearson correlation score
 Finding similar users in the dataset
 Generating movie recommendations

6. Analyzing Text Data
 Introduction
 Preprocessing data using tokenization
 Stemming text data
 Converting text to its base form using lemmatization
 Dividing text using chunking
 Building a bagofwords model
 Building a text classifier
 Identifying the gender
 Analyzing the sentiment of a sentence
 Identifying patterns in text using topic modeling
 7. Speech Recognition

8. Dissecting Time Series and Sequential Data
 Introduction
 Transforming data into the time series format
 Slicing time series data
 Operating on time series data
 Extracting statistics from time series data
 Building Hidden Markov Models for sequential data
 Building Conditional Random Fields for sequential text data
 Analyzing stock market data using Hidden Markov Models

9. Image Content Analysis
 Introduction
 Operating on images using OpenCVPython
 Detecting edges
 Histogram equalization
 Detecting corners
 Detecting SIFT feature points
 Building a Star feature detector
 Creating features using visual codebook and vector quantization
 Training an image classifier using Extremely Random Forests
 Building an object recognizer

10. Biometric Face Recognition
 Introduction
 Capturing and processing video from a webcam
 Building a face detector using Haar cascades
 Building eye and nose detectors
 Performing Principal Components Analysis
 Performing Kernel Principal Components Analysis
 Performing blind source separation
 Building a face recognizer using Local Binary Patterns Histogram

11. Deep Neural Networks
 Introduction
 Building a perceptron
 Building a single layer neural network
 Building a deep neural network
 Creating a vector quantizer
 Building a recurrent neural network for sequential data analysis
 Visualizing the characters in an optical character recognition database
 Building an optical character recognizer using neural networks
 12. Visualizing Data
 Index
Product information
 Title: Python Machine Learning Cookbook
 Author(s):
 Release date: June 2016
 Publisher(s): Packt Publishing
 ISBN: 9781786464477
You might also like
book
Python Machine Learning Cookbook  Second Edition
Discover powerful ways to effectively solve realworld machine learning problems using key libraries including scikitlearn, TensorFlow, …
book
Python: Real World Machine Learning
Learn to solve challenging data science problems by building powerful machine learning models using Python About …
book
Natural Language Processing Recipes: Unlocking Text Data with Machine Learning and Deep Learning using Python
Implement natural language processing applications with Python using a problemsolution approach. This book has numerous coding …
book
TensorFlow Machine Learning Cookbook
Explore machine learning concepts using the latest numerical computing library  TensorFlow  with the help …