Machine Learning Intro for the Masses

In the last post on FaceApp we tried to look at how it works. To do that we jumped straight into something called a neural network. If you missed the post you should definitely check it out here : . However, we feel like we jumped a few stairs there.

Hence, we feel like this post on Machine Learning is a necessity. May be not for the more techy ones among our readers but mainly for our casual audience. Feel free to skip to some other article if you think you already know what Machine Learning is or you could read on and give your valuable input in the comments below :-)

So, What is Machine Learning ?

You might be unfamiliar with the term ML but nobody in the 21st century is unaware of the term AI (Artificial Intelligence). So, let's get to machine learning through AI. 

As the name suggest AI is about artificially creating "Intelligence" or you can say "Human Intelligence". However Intelligence is not something standalone on its own i.e. it has more of a modular structure consisting of different cognitive modules and processes.  

To give a test, an intelligent system has to have  efficient memory management. For example, human memory is designed based on associating memory elements. (unlike the  address based memory system we use in our computers.) Associative memory makes cue triggered retrieval superfast (like the auditory cue "taylor" triggers memory of either face of a lady or mathematical formula or both, depending on how nerdy you are ! ), although a full search can be very difficult and on many occasion can fail (yea, the feeling you get in exam halls!). Similarly, an AI system should be able to process sensory inputs like human beings do. So, there has to modules like computer vision, audio processing etc. (Interestingly, an higher animal like smell (olfactory) module is very hard to design because as of now the exact mechanism of smelling is not known to us! if you are interested, google search "shape theory vs. vibration theory of olfaction").  Another important component of an intelligent system "Decision Making" i.e. after processing some sensory inputs what action does the AI decide to take ? (that's where the robot apocalypse can start !)

Now, among all these subcategorization one process is common. The AI to has "learn". It has to "learn" some visual model to understand what's there in a picture. For human beings it is obvious. But, not so much for a machine. For a machine a picture is ultimately an (or three) array of pixel intensity values, isn't it ? The field addressing this aspect of learning is "Computer Vision". Similarly, the AI has to learn how to make meaning of auditory inputs or text inputs. (Imagine how does jarvis underatnd english and all the irony and sarcasms uttered by stark ? ) The discipline of Linguistics and Natural Language Processing tries to address this problem of learning of the machine. Similarly, disciplines of Reinforcement Learning, Decision Theories try to address the "Decision Making" problem. And finally, there is the problem of knowledge. How to educate an AI, for example, to do maths or to recognize players of a particular football team etc.?  The discipline of computer science encompassing all these forms of learning is called "Machine Learning".  
image: Linked In | Machine Learning vs Deep learning

A Brief Overview of Machine Learning

Computer scientists have developed many different techniques of machine learning since late 20th century. Almost Machine Algortihm's goal is to learn some kind of a "model" by analyzing a set of data(training data and validation data). Then we can use the learned model to make some predicitons about a set of new data (test data). And the accurate the predictions are the better the ML algorithm is. (Remember that it is trivial to produce 100% or near 100% predicttion on the train data, just memorise all the train data. But it is not trivial to produce similar performance on new data which the algorithm hasn't seen before. That is where the art of machine learning comes in.)

Three major kinds of machine learning algorithms are the following:

1. Supervised Learning

A supervised learning algorithm is something where the train data is accomapnied with some their prediction labels. For example, a machine learning model for detecting spam emalis gets input as a list of emails with the information as whether they are spam or not spam. After training the algorithm it has to predict whether a new email that arrives in your inbox as spam or not spam. This is a supervised "classification" task. Now, if the label is real valued instead of labels like "spam"  or "not spam", then the task is called "regression", one example is temperature forecasting.

The image below shows basically how a supervised machine learning algorithm looks like.

Basic format of supervised learning

2. Unsupervised Learning

In an unsupervised learning scenario the ML algorithm is not provided with any label information and in effect has to discover some structure from the data itself. Or one may say the algorithm itself has to design and attribute labels to the input and future data. Clustering a bunch of data points is one such example. 
Image of 3 clusters detected by an unsupervised learning algorithm (red, black and green) among a set of data points. Source:

3. Reinforcement Learning

Reinforcement learning very closely mimics the animal way of learning. Reinforcement learning algorithms are generally agent based algorithm where the algorithm acts as an agent and learns through getting reward and/or punishments for taking different actions as the agent. To simplify the idea, suppose you are playing "super mario". If you successfuly avoid an obstacle or jump over a trap, you get some points, but if you cannot then your game is over and you have to start over again. But  since you got punishment for falling in the trap last time you will try to avoid the same next time you are playing. This process is mathematically immplementable and hence gives rise to a plethora of reinforcement learning algorithms. There are reinforcement learning algorithms which out perform human experts by a very large margins.*vz3AN1mBUR2cr_jEG8s7Mg.png

Deep Learning

We described deep learning to some extent in the previous post. Deep Learning is basically a way of machine learning. It is a style of architecture majorly consisting of Deep Neural Networks. It can be used to do either of supervised, unsupervised and reinforcement learning tasks.

Deep Learning since its advent as a visual task performing algorithm have been used in variety of problems in different manners and has always been a class apart in terms of the accuracy they achieve. Though in many cases prediction rational of machine learning algorithms becomes very important which in case of deep learning becomes very difficult to determine since there are thousands of parameters influencing a single model. One such example is "medication recommendation", deep learning can be used to recommend medication to a patient , however to keep track of the patient history and proper treatment it is very important to know why the said medication was recommended by a particular deep learning model.  

In short, with deep learning prediction becomes easy but to figure out why the model predicts what it predicts becomes a very daunting challenge.

Prerequisites for ML

If you are interested in pursuing or learning Machine Learning in depth you shall need the following skills as prerequisite: 
  1. Linear Algebra knowledge 
  2. Differential Calculus
  3. Probability and Statistics, specially if you  want to join the world of "Bayesian Machine Learning"
  4. A scripting language, preferably Python but Octave/Matlab will do too.
  5. Algorithms
  6. Data Structures 

Future of ML

The huge tech revolution rooted at ML cannot go unnoticed by any curious person in today's world. From google's weather predictions to youtube's personalized video recommendation, ML is everywhere. Understandably, the field offers few of the most high paying jobs in software industries.  The more interesting places where ML is recently being used are health, bioinformatics, cyber security etc. Imagine a machine learning model which predicts what disease you are going to catch a month from now. Prevention is better than cure, isn't it ? It is actually possible as genomesequencing becomes cheaper and cheaper. Howerver there would be some ethical concerns surrounding the same. Let's keep those discussions for another post.

So, this was a brief overview of ML for those who were previously not acquainted with the field. We hope we did justice with the post. Please, let us know your thoughts in the comments. Share the article with your friends and family and stay tuned for the next post. Bye for now !