Python Machine Learning By Example

Third Edition

Build intelligent systems using Python, TensorFlow 2, PyTorch, and scikit-learn

Yuxi (Hayden) Liu

BIRMINGHAM - MUMBAI

Copyright © 2020 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Producer: Tushar Gupta

Acquisition Editor – Peer Reviews: Divya Mudaliar

Content Development Editor: Joanne Lovell

Technical Editor: Aditya Sawant

Project Editor: Janice Gonsalves

Copy Editor: Safis Editing

Proofreader: Safis Editing

Indexer: Tejal Daruwale Soni

Presentation Designer: Sandip Tadge

First published: May 2017

Second edition: February 2019

Third edition: October 2020

Production reference: 1281020

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-80020-971-8

www.packt.com

packt.com

Subscribe to our online digital library for full access to over 7,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.

Why subscribe?

  • Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
  • Learn better with Skill Plans built especially for you
  • Get a free eBook or video every month
  • Fully searchable for easy access to vital information
  • Copy and paste, print, and bookmark content

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.Packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

At www.Packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.

Contributors

About the author

Yuxi (Hayden) Liu is a machine learning software engineer at Google. Previously he worked as a machine learning scientist in a variety of data-driven domains and applied his expertise in computational advertising, marketing, and cybersecurity. He is now developing and improving machine learning models and systems for ad optimization on the largest search engine in the world.

He is an education enthusiast, and the author of a series of machine learning books. His first book, the first edition of Python Machine Learning By Example, was ranked the #1 bestseller in Amazon back in 2017 and 2018, and was translated into many different languages. His other books include R Deep Learning Projects, Hands-On Deep Learning Architectures with Python, and PyTorch 1.x Reinforcement Learning Cookbook.

I would like to thank all the great people who made this book possible. Without any of you, this book would only exist in my mind. I would especially like to thank all of my editors at Packt Publishing, as well as my reviewers. Without them, this book would be harder to read and to apply to real-world problems. Last but not least, I'd like to thank all the readers for their support, which encouraged me to write the third edition of this book.

About the reviewers

Juantomás García leads and is the chief envisioning officer for Sngular's Data Science team. Since joining Sngular in 2018, Juantomás has leveraged his extensive experience to harness the potential of new technologies and implement them across the company's solutions and services.

Juantomás is a Google developer expert for cloud and machine learning, a co-author of the software book La Pastilla Roja, and the creator of "AbadIA", the artificial intelligence platform built to solve the popular Spanish game La Abadía del Crimen. He's an expert on free software technologies and has been a speaker at more than 200 international industry events. Among the various positions he has held during his 20-year career, he has been a data solutions manager at Open Sistemas, a chief data officer at ASPgems, and was the president of Hispanilux for seven years.

He studied IT engineering at the Universidad Politécnica de Madrid and plays an active role as a tech contributor and mentor to various academic organizations and startups. He regularly organizes Machine Learning Spain and GDG cloud Madrid meetups, is a mentor at Google Launchpad for entrepreneurs, and is also an advisor to Penn State University on its Deep Learning Hyperspectral Image Classification for EE project.

I want to thank my family for their support when I was working on revisions of this book. Thanks, Elisa, Nico, and Olivia.

Raghav Bali is a senior data scientist at one of the world's largest healthcare organizations. His work involves research and development of enterprise-level solutions based on machine learning, deep learning, and natural language processing for healthcare- and insurance-related use cases. He is also a mentor with Springboard and an active speaker at machine learning and deep learning conferences. In his previous role at Intel, he was involved in enabling proactive data-driven IT initiatives using natural language processing, deep learning, and traditional statistical methods. He has also worked in finance with American Express, working on digital engagement and customer retention solutions.

Raghav is the author of multiple well-received books on machine learning, deep learning, natural language processing, and transfer learning based on Python and R, and produced with leading publishers. His most recent books are Hands-on Transfer Learning with Python, Practical Machine Learning with Python, Learning Social Media Analytics with R, and R Machine Learning by Example.

I would like to take this opportunity to thank my wife, who has been a pillar of support. I would also like to thank my family for always supporting me in all my endeavors. Yuxi (Hayden) Liu is an excellent author, and I would like to thank and congratulate him on his new book. Last but not least, I would like to thank Divya Mudaliar, the whole Expert Network team, and Packt Publishing for the opportunity and their hard work in making this book a success.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset