Free Sample
+ Collection

Mastering Machine Learning with scikit-learn

Gavin Hackeling

Apply effective learning algorithms to real-world problems using scikit-learn
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783988365
Paperback238 pages

About This Book

  • Design and troubleshoot machine learning systems for common tasks including regression, classification, and clustering
  • Acquaint yourself with popular machine learning algorithms, including decision trees, logistic regression, and support vector machines
  • A practical example-based guide to help you gain expertise in implementing and evaluating machine learning systems using scikit-learn

Who This Book Is For

If you are a software developer who wants to learn how machine learning models work and how to apply them effectively, this book is for you. Familiarity with machine learning fundamentals and Python will be helpful, but is not essential.

Table of Contents

Chapter 1: The Fundamentals of Machine Learning
Learning from experience
Machine learning tasks
Training data and test data
Performance measures, bias, and variance
An introduction to scikit-learn
Installing scikit-learn
Installing pandas and matplotlib
Chapter 2: Linear Regression
Simple linear regression
Evaluating the model
Multiple linear regression
Polynomial regression
Applying linear regression
Fitting models with gradient descent
Chapter 3: Feature Extraction and Preprocessing
Extracting features from categorical variables
Extracting features from text
Extracting features from images
Data standardization
Chapter 4: From Linear Regression to Logistic Regression
Binary classification with logistic regression
Spam filtering
Binary classification performance metrics
Calculating the F1 measure
Tuning models with grid search
Multi-class classification
Multi-label classification and problem transformation
Chapter 5: Nonlinear Classification and Regression with Decision Trees
Decision trees
Training decision trees
Decision trees with scikit-learn
Chapter 6: Clustering with K-Means
Clustering with the K-Means algorithm
Evaluating clusters
Image quantization
Clustering to learn features
Chapter 7: Dimensionality Reduction with PCA
An overview of PCA
Performing Principal Component Analysis
Using PCA to visualize high-dimensional data
Face recognition with PCA
Chapter 8: The Perceptron
Activation functions
Binary classification with the perceptron
Limitations of the perceptron
Chapter 9: From the Perceptron to Support Vector Machines
Kernels and the kernel trick
Maximum margin classification and support vectors
Classifying characters in scikit-learn
Chapter 10: From the Perceptron to Artificial Neural Networks
Nonlinear decision boundaries
Feedforward and feedback artificial neural networks
Approximating XOR with Multilayer perceptrons
Classifying handwritten digits

What You Will Learn

  • Review fundamental concepts including supervised and unsupervised experiences, common tasks, and performance metrics
  • Predict the values of continuous variables using linear regression
  • Create representations of documents and images that can be used in machine learning models
  • Categorize documents and text messages using logistic regression and support vector machines
  • Classify images by their subjects
  • Discover hidden structures in data using clustering and visualize complex data using decomposition
  • Evaluate the performance of machine learning systems in common tasks
  • Diagnose and redress problems with models due to bias and variance

In Detail

This book examines machine learning models including logistic regression, decision trees, and support vector machines, and applies them to common problems such as categorizing documents and classifying images. It begins with the fundamentals of machine learning, introducing you to the supervised-unsupervised spectrum, the uses of training and test data, and evaluating models. You will learn how to use generalized linear models in regression problems, as well as solve problems with text and categorical features.

You will be acquainted with the use of logistic regression, regularization, and the various loss functions that are used by generalized linear models. The book will also walk you through an example project that prompts you to label the most uncertain training examples. You will also use an unsupervised Hidden Markov Model to predict stock prices.

By the end of the book, you will be an expert in scikit-learn and will be well versed in machine learning.


Read More