Jump to ratings and reviews
Rate this book

Python Machine Learning

Rate this book
Unlock modern machine learning and deep learning techniques with Python by using the latest cutting-edge open source Python libraries. About This Book - Second edition of the bestselling book on Machine Learning - A practical approach to key frameworks in data science, machine learning, and deep learning - Use the most powerful Python libraries to implement machine learning and deep learning - Get to know the best practices to improve and optimize your machine learning systems and algorithms Who This Book Is For If you know some Python and you want to use machine learning and deep learning, pick up this book. Whether you want to start from scratch or extend your machine learning knowledge, this is an essential and unmissable resource. Written for developers and data scientists who want to create practical machine learning and deep learning code, this book is ideal for developers and data scientists who want to teach computers how to learn from data. What You Will Learn - Understand the key frameworks in data science, machine learning, and deep learning - Harness the power of the latest Python open source libraries in machine learning - Explore machine learning techniques using challenging real-world data - Master deep neural network implementation using the TensorFlow library - Learn the mechanics of classification algorithms to implement the best tool for the job - Predict continuous target outcomes using regression analysis - Uncover hidden patterns and structures in data with clustering - Delve deeper into textual and social media data using sentiment analysis In Detail Machine learning is eating the software world, and now deep learning is extending machine learning. Understand and work at the cutting edge of machine learning, neural networks, and deep learning with this second edition of Sebastian Raschka's bestselling book, Python Machine Learning. Thoroughly updated using the latest Python open source libraries, this book offers the practical knowledge and techniques you need to create and contribute to machine learning, deep learning, and modern data analysis. Fully extended and modernized, Python Machine Learning Second Edition now includes the popular TensorFlow deep learning library. The scikit-learn code has also been fully updated to include recent improvements and additions to this versatile machine learning library. Sebastian Raschka and Vahid Mirjalili's unique insight and expertise introduce you to machine learning and deep learning algorithms from scratch, and show you how to apply them to practical industry challenges using realistic and interesting examples. By the end of the book, you'll be ready to meet the new data analysis opportunities in today's world. If you've read the first edition of this book, you'll be delighted to find a new balance of classical ideas and modern insights into machine learning. Every chapter has been critically updated, and there are new chapters on key technologies. You'll be able to learn and work with TensorFlow more deeply than ever before, and get essential coverage of the Keras neural network library, along with the most recent updates to scikit-learn. Style and Approach Python Machine Learning Second Edition takes a practical, hands-on coding approach so you can learn about machine learning by coding with Python. This book moves fluently between the theoretical principles of machine learning and the practical details of implementation with Python.

622 pages, ebook

First published September 23, 2015

792 people are currently reading
2817 people want to read

About the author

Sebastian Raschka

30 books148 followers
Some of my greatest passions are "Data Science" and machine learning. I enjoy everything that involves working with data: The discovery of interesting patterns and coming up with insightful conclusions using techniques from the fields of data mining and machine learning for predictive modeling.

I am a big advocate of working in teams and the concept of "open source." In my opinion, it is a positive feedback loop: Sharing ideas and tools that are useful to others and getting constructive feedback that helps us learn!

A little bit more about myself: Currently, I am sharpening my analytical skills as a PhD candidate at Michigan State University where I am currently working on a highly efficient virtual screening software for computer-aided drug-discovery and a novel approach to protein ligand docking (among other projects). Basically, it is about the screening of a database of millions of 3-dimensional structures of chemical compounds in order to identifiy the ones that could potentially bind to specific protein receptors in order to trigger a biological response.

In my free-time I am also really fond of sports: Either playing soccer or tennis in the open air or building models for predictions. I always enjoy creative discussions, and I am happy to connect with people. Please feel free to contact me by email or in one of those many other networks!

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
350 (46%)
4 stars
281 (37%)
3 stars
95 (12%)
2 stars
21 (2%)
1 star
9 (1%)
Displaying 1 - 30 of 39 reviews
Profile Image for Pēteris.
45 reviews
December 21, 2015
This is a great book.

It gives the mathematical definitions of popular machine learning algorithms and shows you how to implement them. Then it explains how to use them with scikit-learn which has much more efficient implementations.

What is great is that this book has chapters on data cleaning, what to do with missing data, etc. Compliments greatly the Andrew Ng's ML course which lacked lectures about all of these things.
Profile Image for Hashem Koohy.
37 reviews
August 6, 2016
This is a fantastic introductory book in machine learning with python. It provides enough background about the theory of each (covered) technique followed by its python code. One nice thing about the the book is that it starts implementing Neural Networks from the scratch, providing the reader the chance of truly understanding the key underlaying techniques such as back-propagation. Even further, the book presents an efficient (and professional) way of coding in python, key to data science.
I strongly recommend it to those with a intermediate level of understanding of machine learning principals and python.
230 reviews3 followers
March 20, 2016
The book aims to cover a lot of topics on Machine Learning. The chapters on training Machine Learning algorithms and clustering analysis were very useful. However, embedding machine learning into web applications and training with Theano were a bit out of the scope.
Profile Image for Nico OooooMyyyy.
7 reviews6 followers
January 15, 2021
** I think it is important to disclose your skill level when reviewing these types of textbooks. The complete beginner, as opposed to a statistics major with minimal programming experience will gain different essential skills from the textbook. I am an Economics major with fundamental knowledge in most of the rudimentary parts of Machine Learning (Statistics, programming, analytics). I also read PY4E, Intro to Statistical Learning, and Python for Data Analysis before this. (First 2 are available online for free by the way) **

Dr. Raschka hits a personal sweet spot as he offers a lot more mathematical theory compared to most of the other introductory Python Machine Learning textbooks I browsed through. This ultimately lead me to picking this text based on my intermediate programming level and background knowledge of machine learning.

Aside from the math, I loved his occasional coding-from-scratch approach to models like the Perceptron, Adaline and even a neural network! I think that this under-the-hood approach is tedious in isolation for every model and could easily turn to be overwhelming for a beginner, but it improves your skill to think computationally(Which I still feel like I lack) and not just take advantage of the readily available libraries. Another huge plus was that Dr. Raschka puts links to academic papers and lecture slides for supplementary information. They provides an extensive, but mainly theoretical approach to some models. If you feel a little lost with some of the brief algorithm descriptions, these can really help bring them to clarity.

That being said, I sometimes found the algorithms vaguely written, and there could have been a greater emphasis on the assumptions of each model's implementation. But there are plenty of resources out there to help demystify any misinterpretations you have.At times, I felt they could’ve touched on some other models like QDA. mixture models, and Partial Least Squares. But it is an introductory textbook and cannot give you everything, I would have found a couple more hands-on approaches of end-to-end pipelining helpful so the reader feels ready to undertake their own mini-project at the end.

I liked this book and it was a great introduction to some important models. It also gives you a basic grasp of libraries like sci-kit learn, nltk, and TensorFlow (I say fundamental because sci-kit learn user guide is over 2,700 pages long). In my opinion, I think this book is well-suited for a reader with a quantitative background (Stats, Comp Sci, Engineering etc.) as the proofs and algorithms can get a little hairy for a complete beginner. I would read this with my Jupyter notebook open, and with access to other library manuals open (Numpy, sci-kit learn, pandas etc) in the browser to get the most out of this book.

I was motivated to write a review for this textbook because I have found there is an ‘information overload’(Packt, Oreilly, and Manning are all pushing out books like the world is ending tomorrow) for data science textbooks which make it incredibly difficult to pick which one to avenue to take. I have frequently changed my mind on which activity to do next.. I’ll think about reading an NLP-based textbook, to a pure python based textbook , to doing Kaggle competitions, then to MOOCs, or to YouTube tutorials. Finding an appropriate resource isn’t easy and it’s different for everyone. The software engineer would understand the from-scratch python code very quickly while a math major would whip right through the mathematical proofs.

Everybody has a different path to becoming a self-taught data scientist and I just wanted to share my personal experience with the textbook. If anybody has questions I can also happily answer them and I'd love to hear any experienced reader's recommendations/ advice for me as well: (As long you’re not a YouTuber pushing some junk-grade course)

I am looking for a textbook that is heavily applied which works through ML project(s) or application(s) and is also directed for the intermediate to advanced level. Specifically, Something challenging but that will mainly help give me guidance and advice on how to get a personal project off the ground.

Thanks!

9/10 ...Out of 10 scale is taken from my friend Ryan Bergen who also invoked me to write the review.
81 reviews7 followers
February 15, 2020
El original es muy buen libro para conocer el Aprendizaje Automático, pero esta traducción al español de Marcombo tiene muchos errores que habrá que resolver el próximas ediciones.
194 reviews3 followers
April 12, 2018
Really good book, useful. Nice concise explanations, the maths is all included, and there's even example code! I downloaded a pdf version to my computer because I think I'll be referring to it pretty often.
Profile Image for Michael Burnam-Fink.
1,674 reviews289 followers
August 27, 2018
This a fantastic introduction to machine learning.

Textbooks in computer science in general, and machine learning in particular, have to walk a delicate line. At one level of high abstraction, everything is mathematical proofs. At a level of low-level cookbookls, it's a matter of just plugging and chugging, treating code as magical invocations without getting at the why. Raschka's book hits the sweet spot between the two exactly, explaining the underlying math, how that math is represented in Python, and then what to call in scikit-learn and tensorflow to actually do it.

Raschka assumes a little familiarity with Python (you should have Anaconda installed, know how to use functions, the basics of classes, what a list comprehension is and why it's cool, as well as the basics of manipulating pandas dataframes) and enough math to not be scared by statistics and matrix notation, but beyond that, everything is clear and elegant. I found Chapter 6, on model evaluation, hyperparameter tuning, and grid search particularly useful as a summary of what to do with simple numerical data with scikitlearn. The later chapters of the book provide the fundamentals of natural language processing and the use of multilayer neural networks and deep convolutional networks to classify images, as well as the unreasonable effectiveness of recurrent neural networks on a variety of tasks.

This is an incredible book. The only thing that prevents it from getting 6 stars is a lack of example problems, but that is what Kaggle is for.
27 reviews1 follower
May 10, 2020
A good practical tour round your bread and butter ML techniques with scikit learn, not the most efficient library for the more complex methods such as gradient boosting or DL but good for SVM and regression techniques and the book offers solid explanations and examples .
Profile Image for Kirsty .
54 reviews1 follower
October 9, 2024
Good info, but would I of read it if not for work? Probably not. I feel the author tried to hard to word things in a "cool" way some times which also put me off a bit. I liked the layout though of theory, then example etc and bolding when a definitions coming.
Profile Image for BCS.
218 reviews33 followers
January 26, 2016
There is significant interest, across many diverse application domains, in developing applications that exploit the large and rich data sets that are acquired by computer systems in order to identify trends and correlations and to make predictions and recommendations. These kinds of applications broadly fit into the field of machine learning (ML).

This excellent book is a practical introduction to ML using the Python programming language, along with relevant components of Python’s rich open-source ecosystem of machine learning, numerical computing, graph plotting and other cognate libraries.

The author does not assume any prior ML knowledge, though a basic understanding of the Python language, linear algebra and calculus is useful. An introductory chapter introduces basic machine learning terminology, describing the various types of machine learning, and overviewing the key steps of typical machine learning processes. This introduction also discusses, in general terms, how to install and configure Python and the various libraries required by the remainder of the book.

As may be expected, a significant part of the book is given to the discussion of a variety of different learning algorithms, including the mathematical details of how they work, how they are trained and how they perform against other algorithms. Crucially, the book describes how to use library implementations of each algorithm.

While ML algorithms play a central part in any machine learning application, there are a variety of other issues involved in making these algorithms work effectively in any particular application. The book therefore contains comprehensive discussion of key topics such as data exploration, visualization and preparation, techniques for generating test and validation data sets, algorithm training and evaluation.

The author describes appropriate tools and techniques that can assist with these processes. To help put ML in context, a chapter is also devoted to describing a simple but complete online ML system embedded inside a web application.

The book covers a considerable amount of material over its four hundred pages. Rather than being a dry exposition of ML techniques, the author encourages readers to engage with the text by experimenting with the examples. Naturally, good data sets are required and the book provides links to a variety of real-world data sets that are freely available for download. In addition, the source code for the examples may be downloaded from the book’s website.

Open-source libraries are used extensively, providing efficient implementations and enabling the reader to focus on the machine learning application itself rather than getting bogged down with implementational detail. The text contains lots of practical advice as well as inline links to other sources of information. While this book is a good end-to-end read, it would also serve as a useful reference text. Recommended.

Review by Patrick Hill CEng MBCS CITP
Originally posted http://www.bcs.org/content/conWebDoc/...
Profile Image for Samaneh.
14 reviews
October 20, 2017
This book is a tour of Machine Learning. If you are a complete beginner on the topic, you’ll get the big picture. However it is up to you to go deeper on each concept. I think there could have been a final chapter with a few exercise which incorporated all the concepts which were covered in the book.
Profile Image for Oleksandr Fialko.
24 reviews
January 3, 2017
A good book to learn scikit-learn library. Chapters on theano and embedding the code into a web application are out of scope. I would use scikit-flow instead of theano, since the former is similar to scikit-learn.
45 reviews
February 11, 2024
Python Machine Learning gives a broad overview of ML, and has a nice balance of theoretical concepts as well as practical code samples in Python. It doesn't go too deep into the theory, which is understandable since much of it is so complicated anyway, but the book is still rather technical. There's an accompanying GitHub repo which I found to be very helpful. You can run the code samples and it's all interactive. (Although some of the code is out of date and doesn't run properly.)

My biggest quibble is that I don't necessarily feel like I understand how to do ML. Reading this book feels a bit like drinking from a fire hose. In later chapters, complicated neural network architectures are presented without much explanation for why one would choose those over the alternatives. I'm sure that'd be a long discussion on its own and this is already a huge book, but still, it'd be nice to learn more of the motivations behind this stuff.

I think this book works great as a way to get exposure to a bunch of different ML techniques, with the understanding that for any particular application, you'll likely need to learn a lot more to gain any sort of real-world proficiency.
Profile Image for Роман Вашурин.
12 reviews1 follower
August 4, 2021
Great introduction to scikit-learn, scipy, tensorflow and keras, provided code is good. The math behind the concepts being talked about though is very poorly delivered, so this is not a book to learn about mathematical aspect of any of the described approaches, better to look elsewhere for those. It has, though, a lot of references to other books and articles, which is nice, and allows the reader to dig deeper into any of the topics being discussed. Another really good thing, is that the author is very responsive on associated github repo. So, great book if you want to get some hands-on experience with python ML stack, but not the best to learn about fundamentals and inner workings of ML methods.
Profile Image for Joseph Yao.
7 reviews
December 23, 2021
It's my first book to learn machine learning modeling using python. This book covers a lot of topics, from logistic regression to neural networks and provides step-by-step implementation code so that you can replicate and test on your own machine. The author's explanation is splendid and suitable for any reader with some background in probability and linear algebra. Though I feel like the content of this book is bit of outdated, it's still a good starting point for anyone who is interested in machine learning and wishing to realize these algorithms using Python.
Profile Image for Robert.
1 review2 followers
January 31, 2019
Highly recommend. Several years ago I was a scientist looking to learn machine learning. This book hit the perfect sweet spot between technical accuracy and accessibility and gave me a great foundation. Highly recommend for an accessible, but not watered down introduction. Early in the book you will write your own neural network and keep going from there. I give this to other scientists who want to learn machine learning.
37 reviews4 followers
September 10, 2021
Took me a quite bit of time to complete the book.
But I will say the time spent on the book is worth it.

This book provided me the all necessary guidance while I began my journey in ML/DL.
Topics started from the basics and ended at Reinforcement Learning while covering boosting , NN, CNNs, RNNs, and GAN in an elaborative manner.

PS : The book is not that much mathematical demanding and in my opinion covers the right amount to get you started.
221 reviews14 followers
June 11, 2017
Okay, not 5 stars, 4.75 really. The book finds a sweet balance between mathematics and python, although throughout reading the book I found the balance was shifting a but (in the bad sense of shifting). One of the better books I've read on this subject.
Profile Image for Aileen.
188 reviews7 followers
February 18, 2018
I really appreciate the well documented code repository on github. Book was easy to follow despite being relatively math heavy. Explanations on common ML algorithms and clustering analysis were on point and easy to follow. This book is a good reference point for learners.
Profile Image for Robert Muller.
Author 15 books35 followers
September 19, 2018
A solid and practical intro to machine learning

The combination of reasonably explained math and excellent code examples are what make this book excellent. It also always gives a good reference for going deeper.
Profile Image for Frank.
36 reviews2 followers
October 1, 2018
This is a good book that combines mathematical explanation, intuition, python implementation, and off-the-shelf model usage. For my background, this is a very logical way of approaching machine learning.
Profile Image for Hungy Ye.
19 reviews1 follower
March 9, 2018
The best intro Python ML book, becuase it actually tries to teach you. Read the Author's reponse to 'why this book' on the goodreads page, it's accurate.
Profile Image for Rafal Klat.
25 reviews3 followers
April 25, 2019
Lots of examples (every idea has an example), but...

...aaaaa, Polish translation is awful!!!!! I hope that original English version doesn’t have this huge disadvantage.
Profile Image for MrWeckx.
8 reviews3 followers
April 12, 2020
Perfect book for introduction on machine learning to intermediate level. Very comprehensive for graduate or undergraduate students.
Profile Image for James Mason.
558 reviews20 followers
Read
November 26, 2021
Did not finish. I gave it a year and a half and just couldn’t make the time. Got about halfway through. I’ll keep it as a reference for the next project I have that requires tools like this.
Displaying 1 - 30 of 39 reviews

Join the discussion

Can't find what you're looking for?

Get help and learn more about the design.