Demystifying Machine Learning (Part 1)

Demystifying Machine Learning (Part 1)

TLDR;

  • Machine Learning (ML) is a form of Artificial Intelligence (AI)
  • ML typically has 3 forms: 1) Supervised ML, 2) Unsupervised ML and 3) Reinforcement ML
  • Supervised ML: You give the model data which has features (inputs) and labels (outputs) and ask it to figure out how to predict the labels from the features
  • Unsupervised ML: You give the model data and ask it to find out if there are any patterns in the data
  • Reinforcement ML: You ask the model to accomplish tasks/goals. When it does the model is (mathematically) rewarded; when it does not it is (mathematically) punished.
  • If you think I've missed something important then please leave a comment and add to our discussion!

First we had "The Cloud". Then we had "Big Data and Analytics". Now we have "Artificial Intelligence & Machine Learning" as the latest buzz words meant to convey the multitude of ways technology will disrupt and revolutionize the world. It's all very exciting and I find I have a lot of conversations with individuals who typically fall into one of three categories:

  1. Know what machine learning is and geek out over it (I'd like to think I fall into this category)
  2. Don't know what machine learning is but buy into the hype, and
  3. Get really turned off by discussions around machine learning because they don't understand it.

This article is primarily addressed to individuals in categories 2 and 3. I want to demystify machine learning for you.



If a 30,000 ft. statement sounds like:

Machine Learning is the application of statistical techniques and statistical inference to predict/classify outcomes.

and a 1,000 ft. statement sounds like:

A MNL model is a generalized linear model where the co-efficients represent the log-odds of discrete choices and can be calibrated using a maximum likelihood estimation

(so still not fully in the weeds but getting pretty close) then I want this 2-part article to cruise at an altitude of about 10,000 ft. I'll do so by highlighting the three broad categories of Machine Learning (ML) and finish off with some descriptions of some of the more common ML algorithms.

I don't plan to be fully exhaustive nor do I want to get too technical in the details. As such I may simplify some concepts or take some shortcuts in explaining. So at the bottom I'll point you to some resources you can check out if you want to dive a deeper or really broaden your knowledge on the subject.

But first....

What's the difference between Artificial Intelligence and Machine Learning?

In a nutshell Machine Learning (ML) is a form of Artificial Intelligence (AI). AI is any attempt to replicate cognitive abilities through technology (i.e. simulate the human brain). AI can broadly be broken down into these categories:

  • Computer Vision
  • Robotics/Actuators (how to move and manipulate objects)
  • Natural Language Processing (NLP)
  • Search & Planning (for example, how to play chess)
  • Reasoning & Knowledge Representation (for example, IBM Watson)
  • Perception (identifying and analyzing vision and sound)
  • Learning

What makes ML so special is that we've come to a point where a lot of the work that is going on in ML is helping to make new advancements in the other AI categories. For example, self-driving cars are an example of applied Computer Vision/Perception/Robotics (how do you get a car to drive itself given what the camera sees). Well it turns out some of the work that's gone on in Machine Learning has been great for helping cars to identify objects/hazards/situations/etc. on the road and then decide what to do when those objects/situations are identified.

And that leads us to...

The different forms of Machine Learning

Machine Learning can broadly be broken down into 3 types:

  1. Supervised Machine Learning
  2. Unsupervised Machine Learning
  3. Reinforcement Learning

But before I get into those here are a few terms I'd like you to know:

  • Features - The inputs that go into the model. I'll give some examples below.
  • Labels - The targeted output of the model (ie what you are trying to predict). Again, I'll give some contextual examples below. You'll also note that not every form of Machine Learning needs labels.
  • Train a model - Just like a gymnyst would train through practice a ML algorithm can 'train' (and get better) by practicing on data you give it in order to become better at predicting.
  • Training Data - A data set that has features (and likely but not always labels) that you can use to tune or calibrate your model to.

Supervised Machine Learning

In Supervised Machine Learning the output that you expect is typically a prediction in the form of a classification or a numerical value. For example, "What type of dog is in this picture?" is a classification problem; "How much will this house sell for" is a numerical prediction problem; "Is this a fraudulent credit card transaction" is a classification problem.

The data you give to the model has features and labels. Let's take the example of predicting a home price. Let's say you want to train a model and you have training data that has all the house transactions in your city for the past 5 years. The list of features in your data set may include:

  • Number of Bedrooms
  • Number of Bathrooms
  • Square Footage
  • Age
  • Location
  • Condo or Freehold
  • Exterior Colour
  • Nearby School

While the label would be price of the home sale.

Let's use fraudulent credit card transactions as an example of a classification problem. The features in the training data may be:

  • The vendor
  • The city/country of the vendor
  • The size of the transaction
  • The number of times the cardholder has previously shopped at this vendor
  • The time of day

While the label has only two values: 'Fraudulent Transaction' or 'Legitimate Transaction'

So in Supervised Machine Learning you are giving your algorithm some input data (features), some outputs associated with that input data (labels) and then you're saying "I want you to train and learn what is the relationship between these features and labels so that you can predict the outcome when I give you new data".

Unsupervised Machine Learning

In Supervised ML you're asking the model to figure out the relationship between features and labels. In Unsupervised ML you don't give any labels. You just give features.

If you're using Unsupervised ML your goals are different. You're asking the model to identify pattern and/or relationships in the data without really telling the model how the data is related. Let's go over an example.

Let's say you work in marketing for a baseball team and want to understand what are the major types of groups (or clusters) of people that purchase season tickets. So you go to your database and decide you want to give your model the following data:

  • Number of years as a season ticket holder
  • Age
  • Gender
  • Occupation
  • Section of season tickets
  • Number of seats purchased in season ticket package
  • Liked on Facebook
  • Followed on Twitter
  • Percentage of games attended last season
  • Electronic or Paper tickets
  • Attended fan appreciation event

So you feed your data into your model and you ask your model to see if it can group all those individuals into distinct groups based on those features. You're not asking it to predict anything (i.e. you are NOT supervising it with labels). You're simply asking your model to see if there are any patterns in the data that it can identify.

Reinforcement Learning

Think of reinforcement learning as training your model (aka your agent) to do a task or accomplish a goal. Reinforcement learning has been used to teach ML models to play the game Go or to play video games. You give the model a goal, like 'win the game' and every time it successfully accomplishes the goal you (mathematically) reward it while every time it does something wrong or bad you (mathematically) punish it. Thus over time as the model gets rewarded/punished it starts to learn which actions get it closer to its goal and which actions have bad consequences.

I know that's a pretty vague description. When I touch on Neural Networks and Deep Learning I'll get a bit more specific.

In Part 2 I'll go over some examples of common models that are typically used when building Machine Learning algorithms.

If you've made it this far thanks for reading! As promised here are some resources you can tap into:

When will the part 2 come out? 

Like
Reply

Thanks Jenny Jin! Stay tuned for Part 2!

Like
Reply

Great write up. I like the analogies you made through out to make the 10,000 feet flight through ML a breeze!

To view or add a comment, sign in

More articles by Arvind Chahal

  • Re-qualifying for my job in 2020

    Well a new year (and decade) is around the corner! End of year is always a great time to reflect and think about what I…

    1 Comment
  • 5 lessons I've learned studying for my Masters of Analytics

    In January 2017 I began the Masters of Management Analytics program (MMA) offered by Smith School of Business at…

    4 Comments

Others also viewed

Explore content categories