A quick note — this article is actually supposed to be an interactive book. Below you will find the link to the other portions of the book along with their links to open them in Google Colab. The text along with the code can also be found there.
Table of contents:
Introduction — Open in Google Colab
Chapter 1: Linear Regression — Open in Google Colab
These past few years has seen an explosion in machine learning (ML) and artificial intelligence (AI). It seems as if one can’t go through the news without reading about the newfound success with AI. All the top start-ups seem to be some kind of AI company. Not just that, but machine learning, deep learning and artificial intelligence are buzz words that everyone seems to be incorporating into their business in hopes that it will allow them to get ahead of their competition.
The above is the reason as to why I wanted to write this book and give it away for free. The world is talking so much about machine learning and AI, but hardly anyone seems to know how it works, but then, on the flip side, everyone makes it seem like they’re experts on it. The unfortunate truth is that the knowledge and know-how seem to be stuck with the academic elites. For the most part, the material online for learning about machine learning and deep learning falls into 1 of 3 categories: shallow tutorials with barely any explanation on why certain patterns are followed; copy and paste material by those who want to pretend to have a self-made portfolio; or such intimidating math heavy lessons, that you get lost in all the Greek. This book was written to get away from all of that. It’s meant to be a very easy read which walks the reader through a journey on the fundamentals of neural networks. This books purpose is to get the knowledge out of the hands of the few and bring it into the hands of any coder.
Before continuing, let’s clear something up. From an outsider’s perspective, the world of AI consists of so many terms which seem to mean the same thing. Machine learning, deep learning, artificial intelligence, neural networks. Why are there so many seemingly synonymous terms? Let’s take a look at the diagram below.
As you can see, AI is a really broad term. It covers many techniques and can be implemented in many different ways. Simple automation code can be considered a type of AI and machine learning also falls into that bucket. It really depends on the problem. Deep learning is a type of machine learning and neural networks is what is used to make deep learning happen. Hope the above brings some clarity around all the jargon thrown around.
Machine learning has been around for decades, so has neural networks. Statisticians have been studying and teaching machine learning for a really long time. The reason for the recent explosion in this field has a lot to do with the ability to train neural networks. Along with recent research on how to better deal with deep learning, advancements in computer hardware and GPUs has really catapulted the use of deep learning. Before the utilization of GPUs, the tasks which we deem to be trivial today, used to take days, even weeks, along with expensive computing power to accomplish.
Let’s talk a little bit about myself. I have an undergraduate degree in computer science from a Canadian university. Having said that, when I came out of university, I had no clue what machine learning was and absolutely no intention of being where I am today. After having landed a job as a data analyst at a retail store, I started hearing more and more about this world of machine learning and AI. My manager at the time had a graduate degree in statistics and he would talk to the team about the cool work he would take on making predictions for how customers were going to behave. This sparked my interest. I started studying, and I studied a lot. Everything I learned with regards to machine learning was done on my own time and own effort. I started reading, watching and listening to anything I could get my hands on. I then stumbled upon Jeremy Howard’s FastAI course. At first, I found it to be difficult to wrap my head around, but slowly, I was able to grasp every concept. I would Google everything always. It was very frustrating that I couldn’t just find everything in 1 place. All of this led me to wanting to write this book. To help those who are scouring the internet for answers and to show that a PhD isn’t required to get into the world of AI, neither is a masters. All you need is hard work and dedication.
As for this book, the prerequisites aren’t much. I’m not going to tell you that you need university math or statistics, although they would help. High school math should be sufficient. I do recommend at least 1 year of coding, preferably in Python. You could maybe get away with less than that, but it might be difficult. The good news is that this book is free, so you’re not losing anything by trying.
If you skim through the book, you’ll see that it introduces machine learning and neural networks. We’ll go over a little bit of the math, but more importantly, it’ll be a coding first approach to it. Rather than throw a bunch of equations at the reader, expecting them to know how to piece it all together, this book walks through the intuition and how to bring that together with code. Unless you’re reading this book on an eReader, a PDF, or in an article, you’ll find that it’s written in something known as a Jupyter notebook. The reason being is that it allows the reader to execute and experiment with the code inside the book, without having to move between environments. A quick note, if you’ve never experienced Jupyter notebooks, you’ll sometimes see the code cell to fail. It’s probably because you didn’t run the code cells which it’s dependent on. In order for the code cell to work, it’s dependencies must be executed before it, in sequential order.
Now that we got that out of the way, that’s it for my introduction. Let’s get right into it and begin with chapter 1…