Book description
A comprehensive guide to get you up to speed with the latest developments of practical machine learning with Python and upgrade your understanding of machine learning (ML) algorithms and techniques
Key Features
 Dive into machine learning algorithms to solve the complex challenges faced by data scientists today
 Explore cutting edge content reflecting deep learning and reinforcement learning developments
 Use updated Python libraries such as TensorFlow, PyTorch, and scikitlearn to track machine learning projects endtoend
Book Description
Python Machine Learning By Example, Third Edition serves as a comprehensive gateway into the world of machine learning (ML).
With six new chapters, on topics including movie recommendation engine development with Naive Bayes, recognizing faces with support vector machine, predicting stock prices with artificial neural networks, categorizing images of clothing with convolutional neural networks, predicting with sequences using recurring neural networks, and leveraging reinforcement learning for making decisions, the book has been considerably updated for the latest enterprise requirements.
At the same time, this book provides actionable insights on the key fundamentals of ML with Python programming. Hayden applies his expertise to demonstrate implementations of algorithms in Python, both from scratch and with libraries.
Each chapter walks through an industryadopted application. With the help of realistic examples, you will gain an understanding of the mechanics of ML techniques in areas such as exploratory data analysis, feature engineering, classification, regression, clustering, and NLP.
By the end of this ML Python book, you will have gained a broad picture of the ML ecosystem and will be wellversed in the best practices of applying ML techniques to solve problems.
What you will learn
 Understand the important concepts in ML and data science
 Use Python to explore the world of data mining and analytics
 Scale up model training using varied data complexities with Apache Spark
 Delve deep into text analysis and NLP using Python libraries such NLTK and Gensim
 Select and build an ML model and evaluate and optimize its performance
 Implement ML algorithms from scratch in Python, TensorFlow 2, PyTorch, and scikitlearn
Who this book is for
If you're a machine learning enthusiast, data analyst, or data engineer highly passionate about machine learning and want to begin working on machine learning assignments, this book is for you.
Prior knowledge of Python coding is assumed and basic familiarity with statistical concepts will be beneficial, although this is not necessary.
Publisher resources
Table of contents
 Preface
 Getting Started with Machine Learning and Python
 Building a Movie Recommendation Engine with Naïve Bayes
 Recognizing Faces with Support Vector Machine

Predicting Online Ad ClickThrough with TreeBased Algorithms
 A brief overview of ad clickthrough prediction
 Getting started with two types of data – numerical and categorical
 Exploring a decision tree from the root to the leaves
 Implementing a decision tree from scratch
 Implementing a decision tree with scikitlearn
 Predicting ad clickthrough with a decision tree
 Ensembling decision trees – random forest
 Ensembling decision trees – gradient boosted trees
 Summary
 Exercises

Predicting Online Ad ClickThrough with Logistic Regression
 Converting categorical features to numerical—onehot encoding and ordinal encoding
 Classifying data with logistic regression

Training a logistic regression model
 Training a logistic regression model using gradient descent
 Predicting ad clickthrough with logistic regression using gradient descent
 Training a logistic regression model using stochastic gradient descent
 Training a logistic regression model with regularization
 Feature selection using L1 regularization
 Training on large datasets with online learning
 Handling multiclass classification
 Implementing logistic regression using TensorFlow
 Feature selection using random forest
 Summary
 Exercises
 Scaling Up Prediction to Terabyte Click Logs

Predicting Stock Prices with Regression Algorithms
 A brief overview of the stock market and stock prices
 What is regression?
 Mining stock price data
 Estimating with linear regression
 Estimating with decision tree regression
 Estimating with support vector regression
 Evaluating regression performance
 Predicting stock prices with the three regression algorithms
 Summary
 Exercises
 Predicting Stock Prices with Artificial Neural Networks
 Mining the 20 Newsgroups Dataset with Text Analysis Techniques
 Discovering Underlying Topics in the Newsgroups Dataset with Clustering and Topic Modeling

Machine Learning Best Practices
 Machine learning solution workflow
 Best practices in the data preparation stage

Best practices in the training sets generation stage
 Best practice 6 – Identifying categorical features with numerical values
 Best practice 7 – Deciding whether to encode categorical features
 Best practice 8 – Deciding whether to select features, and if so, how to do so
 Best practice 9 – Deciding whether to reduce dimensionality, and if so, how to do so
 Best practice 10 – Deciding whether to rescale features
 Best practice 11 – Performing feature engineering with domain expertise
 Best practice 12 – Performing feature engineering without domain expertise
 Binarization
 Discretization
 Interaction
 Polynomial transformation
 Best practice 13 – Documenting how each feature is generated
 Best practice 14 – Extracting features from text data
 Tf and tfidf
 Word embedding
 Word embedding with pretrained models
 Best practices in the model training, evaluation, and selection stage
 Best practices in the deployment and monitoring stage
 Summary
 Exercises
 Categorizing Images of Clothing with Convolutional Neural Networks

Making Predictions with Sequences Using Recurrent Neural Networks
 Introducing sequential learning
 Learning the RNN architecture by example
 Training an RNN model
 Overcoming longterm dependencies with Long ShortTerm Memory
 Analyzing movie review sentiment with RNNs
 Writing your own War and Peace with RNNs
 Advancing language understanding with the Transformer model
 Summary
 Exercises
 Making Decisions in Complex Environments with Reinforcement Learning
 Other Books You May Enjoy
 Index
Product information
 Title: Python Machine Learning By Example  Third Edition
 Author(s):
 Release date: October 2020
 Publisher(s): Packt Publishing
 ISBN: 9781800209718
You might also like
book
Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and The Cloud
This is the eBook of the printed book and may not include any media, website access …
video
Python Fundamentals
51+ hours of video instruction. Overview The professional programmer’s Deitel® video guide to Python development with …
book
Clean Code: A Handbook of Agile Software Craftsmanship
Even bad code can function. But if code isn't clean, it can bring a development organization …
book
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …