Machine Learning with Python


Reuven M. Lerner

I first heard the term “machine learning” a few years ago, and to be honest, I basically ignored it that time. I knew that it was a powerful technique, and I knew that it was in vogue, but I didn’t know what it really was— what problems it was designed to solve, how it solved them and how it related to the other sorts of issues I was working on in my professional (consulting) life and in my graduate-school research.

But in the past few years, machine learning has become a topic that most will avoid at their professional peril. Despite the scary-sounding name, the ideas behind machine learning aren’t that difficult to understand. Moreover, a great deal of open-source software makes it possible for anyone to use machine learning in their own work or research. I don’t think it’s an overstatement to say that machine learning already is having a huge impact on the computer industry and on our day-to-day lives.

In this ebook, I introduce the basic ideas behind machine learning and show how you can use Python to apply machine learning ideas to a number of different problems. I hope by the time you finish reading this guide, you’ll not only understand what machine learning aims to do, but also how to apply it to your own work and research.


Table of Contents: 
  • What Is Machine Learning?
  • Supervised vs. Unsupervised Learning
  • Models: the Core of Machine Learning
  • Python and scikit-learn
  • An Example of Machine Learning
  • Validating
  • Comparing Models
  • Conclusion
  • Resources
About the Author: 

Reuven M. Lerner offers training in Python, Git and PostgreSQL to companies around the world. He blogs at, tweets at @reuvenmlerner and curates Reuven lives in Modi’in, Israel, with his wife and three children.