6 min read

This post is part of “AI education”, a series of posts that review and explore educational content on data science and machine learning. (In partnership with Paperspace)

With data science and machine learning skills being in high demand, there’s increasing interest in careers in both fields. But with so many educational books, video tutorials and online courses on data science and machine learning, finding the right starting point can be quite confusing.

Readers often ask me for advice on the best roadmap for becoming a data scientist. To be frank, there’s no one-size-fits-all approach, and it all depends on the skills you already have. In this post, I will review three very good introductory books on data science and machine learning.

Based on your background in math and programming, the two fundamental skills required for data science and machine learning, you’ll surely find one of these books a good place to start.

What are the requirements of learning data science and ML?

Data scientists and machine learning engineers sit at the intersection of math and programming. To become a good data scientist, you don’t need to be a crack coder who knows every single design pattern and code optimization technique. Neither do you need to have an MSc in math. But you must know just enough of both to get started. (You do need to up your skills in both fields as you climb the ladder of learning data science and machine learning.)

If you remember your high school mathematics, then you have a strong base to begin the data science journey. You don’t necessarily need to recall every formula they taught you in school. But concepts of statistics and probability such as medians and means, standard deviations, and normal distributions are fundamental.

On the coding side, knowing the basics of popular programming languages (C/C++, Java, JavaScript, C#) should be enough. You should have a solid understanding of variables, functions, and program flow (if-else, loops…) and a bit of object-oriented programming. Python knowledge is a strong plus for a few reasons: First, most data science books and courses use Python as their language of choice. Second, the most popular data science and machine learning libraries are available for Python. And finally, Python’s syntax and coding conventions are different from other languages such as C and Java. Getting used to it takes a bit of practice, especially if you’re used to coding with curly brackets and semicolons.

Principles of Data Science

Written by Sinan Ozdemir, Principles of Data Science is one of the best intros to data science that I’ve read. The book keeps the right balance between math and coding, theory and practice.

Using examples, Ozdemir takes you through the fundamental concepts of data science such as different types of data and the stages of data science. You will learn what it means to clean your data, normalize it and split it between training and test datasets.

The book also contains a refresher on basic mathematical concepts such as vector math, matrices, logarithms, Bayesian statistics, and more. Every mathematical concept is interspersed with coding examples and introduction to relevant Python data science libraries for analyzing and visualizing data. But you have to bring your own Python skills. The book doesn’t have any Python crash course or introductory chapter on the programming language.

What makes the learning curve of this book especially smooth is that it doesn’t go too deep into the theories. It gives you just enough knowledge so that you can make optimal uses of Python libraries such as Pandas and NumPy, and classes such as DataFrame and LinearRegression.

Granted, this is not a deep dive. If you’re the kind of person who wants to get to the bottom of every data science and machine learning concept and learn the logic behind every library and function, Principles of Data Science will leave you a bit disappointed.

But again, as I mentioned, this is an intro, not a book that will put you on a data science career level. It’s meant to familiarize you with what this growing field is. And it does a great job at that, bringing together all the important aspects of a complex field in less than 400 pages.

At the end of the book, Ozdemir introduces you to machine learning concepts. Compared to other data science textbooks, this section of Principles of Data Science falls a bit short, both in theory and practice. The basics are there, such as the difference between supervised and unsupervised learning, but I would have liked a bit more detail on how different models work.

The book does give you a taste of different ML algorithms such as regression models, decision trees, K-means, and more advanced topics such as ensemble techniques and neural networks. The coverage is enough to whet your appetite to learn more about machine learning.

Data Science from Scratch

As the name suggests, Data Science from Scratch takes you through data science from the ground up. The author, Joel Grus, does a great job of showing you all the nitty-gritty details of coding data science. And the book has plenty of examples and exercises to go with the theory.

The book provides a Python crash course, which is good for programmers who have good knowledge of another programming language but don’t have any background in Python. What’s really good about Grus’s intro to Python is that aside from the very basic stuff, he takes you through some of the advanced features for handling arrays and matrices that you won’t find in general Python tutorial textbooks, such as list comprehensions, assertions, iterables and generators, and other very useful tools.

Moreover, the Second Edition of Data Science from Scratch, published in 2019, leverages some of the advanced features of Python 3.6, including type annotations (which you’ll love if you come from a strongly typed language like C++).

What makes Data Science from Scratch a bit different from other data science textbooks is its unique way to do everything… from scratch. Instead of introducing you to NumPy and Pandas functions that will calculate coefficients and, say, mean absolute errors (MAE) and mean square errors (MSE), Grus shows you how to code it yourself.

He does, of course, remind you that the book’s sample code is meant for practice and education and will not match the speed and efficiency of professional libraries. At the end of each chapter, he provides references to documentation and tutorials of the Python libraries that correspond to the topic you have just learned. But the from-scratch approach is fun nonetheless, especially if you’re one of those I-have-to-know-what-goes-on-under-the-hood type of people.

One thing you’ll have to consider before diving into this book is, you’ll need to bring your math skills with you. In the book, Grus codes fundamental math functions, starting from simple vector math to more advanced statistic concepts such as calculating standard deviations, errors, and gradient descent. However, he assumes that you already know how the math works. I guess it’s okay if you’re fine with just copy-pasting the code and seeing it work. But if you’ve picked up this book because you want to make sense of everything, then have your calculus textbook handy.

After the basics, Data Science from Scratch goes into machine learning, covering various algorithms, including the different flavors of regression models and decision trees. You also get to delve into the basics of neural networks followed by a chapter on deep learning and an introduction to natural language processing.

Data Science with Python

In short, I would describe Data Science with Python as a fully hands-on introduction to data science and machine learning. It’s the most practice-driven book on data science and machine learning that I’ve read. The authors have done a great job of bringing together the right data samples and practice code to get you acquainted with the principles of data science and machine learning.

The book contains minimal theoretical content and mostly teaches you by taking you through coding labs. If you have a decent computer and an installation of Anaconda or another Python package that has comes bundled with Jupyter Notebooks, then you can probably go through all the exercises with minimal effort. I highly recommend writing the code yourself and avoiding copy-pasting it from the book or sample files, since the entire goal of the book is to learn through practice.

You’ll find no Python intro here. You’ll dive straight into NumPy, Pandas, and scikit-learn. There’s also no deep dive into mathematical concepts such as correlations, error calculations, z-scores, etc., so you’ll need to get help from your math book whenever you need a refresher on any of the topics.

Alternatively, you can just type in the code and see Python’s libraries work their magic. Data Science with Python does a decent job of showing you how to put together the right pieces for any data science and machine learning project.

Data Science with Python provides a solid intro to data preparation and visualization, and then takes you through a rich assortment of machine learning algorithms as well as deep learning. There are plenty of good examples and templates you can use for other projects. The book also gives an intro on XGBoost, a very useful optimization library, and the Keras neural network library. You’ll also get to fiddle around with convolutional neural networks (CNN), the cornerstone of current advances in computer vision.

Before starting this book, I strongly recommend that you go through a gentler introductory book that covers more theory, such as Ozdemir’s Principles of Data Science. It will make the ride less confusing. The combination of the two will leave you with a very strong foundation to tackle more advanced topics.

Where do you go from here?

These are just three of the many data science books that are out there. If you’ve read other awesome books on the topic, please share your experience in the comments section. There are also plenty of great interactive online courses, like Udemy’s Machine Learning A-Z: Hands-On Python & R In Data Science (I will be reviewing this one in the coming weeks).

While an intro to data science will give you a good foothold into the world of machine learning and the broader field of artificial intelligence, there’s a lot of room for expanding that knowledge.

To build on this foundation, you can take a deeper dive into machine learning. There are plenty of good books and courses out there. One of my favorites is Aurelien Geron’s Hands-on Machine Learning with Scikit-Learn, Keras & TensorFlow (also scheduled for review in the coming months). You can also go deeper on one of the sub-disciplines of ML and deep learning such as CNNs, NLP or reinforcement learning.

Artificial intelligence is complicated, confusing, and exciting at the same time. The best way to understand it is to never stop learning.