Learning Machine Learning: Process Breakdown

Two or more models can build one upon other to produce results which could have huge potential
Photo [HERE]

The handy Oxford dictionary (remember those?) describes learning as "acquisition of knowledge or skills through study, experience or being taught." Humans have, in some ways, learnt the way nature behaves and through years and years and years of painful experience and curiosity, build up a vast array of knowledge that have practical approach to having control over our environment. I see that the overarching goal of learning is learn to control; whether control in form of dams that divert rivers to change one form of energy to the next or predict a weather condition to, again, have control over our time and make decision whether to go forward with that all important BBQ. 

The definition of process of learning though, is entirely subjective. People have their own ways, methods, schedules and regimes to build up skills, to study, to gain experience or to look for mentorship. In many cases, the learning could be structured like how a formal class is being taught. But for many others, it's largely ping-pong from one info to the other until one finally does make sense. 

My approach to understanding and implementing Machine Learning (ML) in my own work was the latter. It's a massive hit or miss study of incredulous amount of keyword searches in google. That's how I learnt before and that was what I was doing it again. Did it only strike me to sit down and ask myself "I were to do it from the beginning, how would I approach it?" that I really began to deconstruct a process that worked for me. This might work for someone else. Here's my take:

A mathematical function (model) that uses statistics and linear algebra to mimic any decision making process (task) that is being replicated. In other words, it's a just a function. That's about it.

The most popular application for ML is an Image Classification problem. The state-of-art way to do that is to use Convolutional Neural Network.

Examples are:
A model that knows how to differentiate between a lion and a tiger
A model that knows how to separate between an orange and lemon
A model that classifies bottles, plastics and paper for waste management

Training in ML is the part where you teach the model how to separate. A trained model can then mimic the decision. In simplest mathematical terms, it's tuning the parameters inside the model.


Build a dummy model from top to bottom without understanding what is going on

Free course that helped me do that:
Udacity's Intro to Tensorflow for Deep Learning

How I also learnt to build from scratch:

It helps to start with the most simplest model for the state-of-art ML algorithm. I used Convolutional Neural Network to separate between cat and dog. It's important to create your own dataset. This way you truely go through the entire process. Also, further helps when you use a popular training platform and training library. I used Google Colab and Tensorflow. You dont have to install anything in your computer or need any hardware if you use Colab. Used high level Keras to access Tensorflow API. Tensorflow and Keras are both open source ML libraries. The programming was done in Python. 

Read Master's or PhD thesis on the relevant ML topic

Thesis's introduction chapters summarize key concepts and vocabulary neatly. It's less dense than a book and is more detailed than a paper; the exact balance to begin learning words. I would first read the entire introductory and ML explained chapter first. I would then do another reading and mark the vocabulary that I don't understand. What is regularization? What is dropout? What are weights and biasis? What is a Global Average Pooling Layer? Why are there kernels and strides and max pools? What is backpropagation, gradient decent? What is a cost function?

You got the point. This will allow you to build a vocabulary that you can then use to further understand the process in Step #1

Read a book or take a less hands-on, theory intense course:

Book that I am currently using:
MIT Deep Learning Book

Course that I frequent back to understand concepts:
Stanford's Convolutional Neural Networks for Visual Recognition

If you are into maths, the MIT book should suffice. 

I personally feel that many people make the mistake of thinking STEP #3 is actually STEP #1 so they start out by reading books or taking heavy courses that ends up making a person more confused than ever. To grasp the knowledge provided by STEP #3, you will need the basic pre-requisite.

Create a dataset

You can find open dataset's for ML training:

For me, I had to create from scratch. I used chrome extension's Download All Images extension to search and download all data from a website with one single click. You will have to filter out images. For data conditioning, I used Adobe Lightroom. For data augmentation, I used Augmentor library. You will have to separate the data into training, validation and test. Test dataset has to be completely different from training and validation. 

Build the actual model and optimize

Build the ML, train and optimize. The optimization part is the most painful portion. You will select a couple of hyper-parameters, do either a random, grid or genetic search on the right combination. 

That should do it. My actual process was much random but if I had to teach someone how to do it, this should allow you to reach a point where you can then start learning and building your own process.


  1. For step 3, I’ve personally found Learning From Data by Abu Mostafa as an excellent primer.

  2. It would be hardly surprising to hear that you don’t ask the same question “Where can I buy assignment?”. Even, if you are trying to do all the homework yourself, there is always a possibility that you’ll want to get help at some stage.


Post a Comment

Popular Posts