Learning, Unlearning, and Machine Learning

A 15 minutes crash course on machine learning for busy professionals

Muhammad Saad Ashfaq
The Startup
9 min readSep 7, 2020

--

If you ever tried to read articles about machine learning on the internet, most likely you came across two types of them—cryptic algebraic texts entrusted to a secret society of statisticians and data scientists. And fluffy fairytales of how robots will take over the world by 2025.

Machine learning has been an invisible part of our lives for many years now. In fact, it dates back to the 1950s. Today, many businesses rely on this technology. If you use the internet, you have somewhat helped companies like Facebook, Google, Netflix, and Amazon train their machine learning models.

Since this technology is so widely adopted and promises to solve some of our world's most complex problems, now would be a good time as any to catch up on the state of things regarding this emerging phenomenon.

To level with you, I am still learning about how machines learn. I began this journey three years ago and had to sit through a classroom, read hundreds of articles, and attend countless webinars, which could have been an email. So, I’ve decided to write this post I’ve been wishing existed for a long time.

This post will be your 15 minutes crash course on everything machine learning, from theories to actual real-world applications. It is guaranteed to equip you with the necessary knowledge to start a conversation with an ML engineer if you ever have to sit next to one on a plane.

Why teach the machines?

Why should we even care to teach machines in the first place? Well, it is because machines are better than humans at finding hidden patterns when there are many variables.

Okay, multiply 13 by 87 right now in your mind. Did it feel uncomfortable? Now try to multiply 2 by 2. Better?

The human mind will find it difficult to compute (13 x 87) compared to (2x2). Whereas for computers, it is a problem of similar complexity. If we assign (read punish) a human to solve simple multiplication problems all day long, they would eventually get bored and abandon the task. In comparison, machines are particularly good at it.

What can the machines learn?

Without all the glamour and fluff, machines can be taught to predict the results based on incoming data. We need three components to teach a machine. Data, features, and algorithms.

And of course, some physical hardware.

How does a machine learn?

When I was a kid, I learned how to draw this image of a house. Over the years, I learned how to describe a house in Urdu, English, and French languages without drawing one. As I grew older, I saw homes of all shapes and kinds in my neighborhood, country, and the world. I am so good at it now that I can identify a house in a split second without even having to think much.

Interestingly, this is also how a machine learns to recognize images.

First, you teach the machine what a house looks like by showing several images of homes from your 1TB external hard-drive (dataset). Next, you help the machine understand the various features—such as doors, windows, and chimneys. Finally, you design an algorithm which teaches the computer to say “that is a house” when it sees one.

So does that mean that your programmer-bro is a machine learning expert? Likely not. Let’s take the example of self-driving vehicles. If we were to approach this as a classical computer programming problem, we would need to teach the car every possible movement on this planet's roads. With machine learning, it doesn't need to memorize all the moves but tries to generalize situations and act rationally.

This is what makes machine learning such a powerful tool!

What have the machines been up to?

In the past decade, we have seen various machine learning applications ranging from saving human lives to recommending songs to groove to your drive back home.

There are as many different ways to approach a machine learning problem as there are its applications. Experts may disagree on their preference for methods, algorithms, and features. But they all agree on one thing. Getting the right data is the real challenge of any machine learning project.

Many companies have found smarter ways to solve this problem. Take Facebook, for example. They have been incentivizing users to tag themselves and their friends in pictures for years now. Over time they have captured plenty of data to train their face-recognition model. Today when you upload a new photo to Facebook, they already know your friend Hasan who just came back from his summer holiday in Hunza.

Have you binge-watched something on YouTube? The other day I was watching a travel vlog. When I opened the app, I intended to watch a quick video before going to bed. I ended up watching four other videos until 2:00 AM. That is not a coincidence, and it is highly likely that you have also had a similar experience. YouTube uses a machine learning-powered recommender engine that curates your own ‘personal playlist’ based on your viewing history, making the viewing experience ‘addictive.’

That, right there, is the beauty of technology. When done right, it becomes a transparent part of our lives. So much so that we forget it ever existed.

AI = ML?

You might have noticed me using the terms AI and ML interchangeably. Are these the same? No. Let me explain:

Artificial Intelligence (AI) is the name of a whole knowledge field, similar to physics or mathemetics. Any technique which enables a machine to mimic human behavior can be labeled as AI.

Machine Learning (ML) is an important part of artificial intelligence, but not the only one. There are two parts to ML. Teaching the machine and the machine becoming smart over time.

Deep learning is an emerging technology used for training and building neural networks. Many people use this term to sound ‘cool.’

What languages do the machines speak?

There is no such thing as the ‘best language for machine learning.’ It depends on your background and the requirement of the project. Most developers prefer using python over other languages because of easiness and speed of coding.

To understand why so, let us try to say ‘hello world’ in three different languages:

  • C:
  • Java:
  • Python:

I will leave it at that and let you decide for yourself.

R is another commonly used language among data-scientists and statisticians. Some call it “statistics on steroids.” However, this amount of steroids would be sufficient to kill a young Hulk.

My favorite machine learning methods

Machine learning has evolved significantly since the 1950s. And in the process, it has branched out. I will share a few essential and commonly used machine learning methods you have most likely used or even helped train. For a comprehensive list, head on over here.

1. Classification:

A few years ago, I decided to change the landscape of my garden. I began reading about different kinds of trees, shrubs, vines, and flowering plants. I was particularly fascinated to learn about the variety of flowering-plants. I wanted to grow orchids and jasmine. While researching, I found a nursery in my neighborhood, which specialized in flowering plants and had jasmine in stock, so I decided to make a trip. At the nursery, I found a new flowering-plant; ‘lavendar’. I added it to my shopping cart and knowledge-base.

In machine-learning terms — this is classification. The method predicts the class based on incoming data points. Classification is an excellent method to answer “yes-or-no” and “this-or-that” questions.

Where is it used?

  • Email service providers, such as g-mail, use a simple classification algorithm to mark spam mails.
  • Google uses classification to decide which search results suit your query.
  • Spotify uses classification algorithms to create playlists.
  • Banks use it to determine if an applicant is eligible for a loan or not.

2. Regression

Regression is a relatively advanced form of classification. It predicts numerical values based on incoming data points instead of just the category.

Where is it used?

  • Stock market analysts use regression methods to predict future performance.
  • Companies use regression tools to estimate the sales of a product based on seasonality.
  • Many property websites use regression tools to determine a fair price for the listing based on its features.

3. Clustering

My friend, Sara, owns a famous street food business. She makes the best BBQ in the world. She recently saved enough money to buy herself a new stall. However, she is confused because her last investment was not as profitable as expected. The foot-fall on her stall was way less than she imagined. So where should she invest?

This is a great problem to solve using clustering methods!

Clustering algorithms divide data points into groups based on natural similarities.

Where is it used?

  • Android and Apple use clustering algorithms to create photo albums on your mobile phone.
  • Google maps suggest the nearest coffee shop to you based on clustering methods.
  • Amazon and other e-commerce platforms use clustering algorithms to recommend similar products.
  • Marketers use clustering methods to segment their target audience.

4. Neural Networks

Neural networks have been in and out of fashion for over 70 years. But in the past ten years, they’ve been trending at an all-time high, to the extent that a few ‘influencers’ have started throwing around #deeplearning in their posts to increase the reach.

Any neural network is basically a collection of neurons and connections between them. Neural networks can replace all of the above machine learning methods. Many call it the rich man’s silver bullet. But you’d have to be really rich to afford a neural-net for every AI problem. Why? Becasue neural-nets require a lot of computing power.

Where is it used?

  • Governments and agencies around the world use neural nets to manage crowds and identify people of interest.
  • Siri and Alexa use it to understand your voice command.
  • Google uses it to translate your messages from one language to another.

Deepfake is another fascinating yet scary application of AI. It fakes video or audio recordings that look and sound just like the real thing. And it fakes it so well that it is tough to tell the difference. Watch for youself:

Finally, how far is too far?

Machine morality police (or the AI ethics community) is asking this fundamental question:

How far is too far? And how much further can we go?

To me, machine learning is a tool that extends human cognition, just like calculators, which enable us to do maths faster, and sticky-notes, which help us to memorize more things.

However, this tool is far more potent than any other we have ever had. It may appear a threat to many because ‘intelligence’ has always been the human mind's provenance only. Now machines can learn too and become intelligent.

But is intelligence all that makes us human? What about trust? Compassion? Courage? Resilience? And Love?

I believe that the question “when will the machines outsmart humans?” is flawed. The question we should be asking is, “what will differentiate us from the machines if not our intelligence?”. Think about it.

Thanks for reading

If you like my work and want to support me:

  1. The best way to show some love is by following me on Medium here
  2. Join me on LinkedIn here

--

--

Muhammad Saad Ashfaq
The Startup

Saad writes about business growth and emerging technologies | Purpose Coach | Growth Strategist at Google