What are the primary types of machine learning algorithms?

An initial walkthrough of machine learning algorithms

Share
What are the primary types of machine learning algorithms?
Photo by Steve A Johnson / Unsplash
đź’ˇ
This is part of an on-going series in cybersecurity foundations. Check the ai-101 article tag index from time to time for more content.

Hi Folks! It's been a while, hasn't it? Apologies for the absence – I've been busy with a few side projects (most notably, some open-source software tools at getstat.dev – please check it out when you have a chance). That all said, it's great to be back and writing. I'm launching a new learning track for HackFAQs centered around AI fundamentals. For today's article, I want to elaborate on the difference between the three main types of machine learning methods/algorithms. Ready? Set? Go!

Let's start by asking a simple (and yet deceptively complex) question: how does a human learn something? It's something that's so ingrained in our personal and professional development that it's pretty easy to take for granted. Let's think about it, though...

  • How does someone learn a new language?
  • How does someone learn to recognize danger?
  • How does someone learn to play a sport?

These are somewhat abstract examples, but hopefully they help to highlight a common point: patterns. As humans, we primarily learn through established mechanics, boundaries, and patterns. For example, if I'm learning a new language, I begin to understand the rules of the language (conventions, phrases, grammar, etc). If I'm learning a sport, I learn the rules of the game. There's also one critical element that's missing: experience. Practice and repetition help us as humans to recognize the subtle details.

Believe it or not, modern machine learning practices are very similar. At its core, machine learning algorithms are basically learning techniques that help recognize and identify meaningful patterns. The more patterns and analysis, the more experience and refinement the model has.

Machine learning is a MASSIVE topic in data science unto itself and I won't pretend to understand it all, but at a high level, there are a few common/main approaches to learning.

Supervised Learning

Supervised learning is a learning approach/algorithm that is grounded in labeled data. Each data point that's fed into the learning model is linked to a known outcome or label. A great example would be training with a collection (dataset) of images containing vehicle types. Imagine seeing a thousand pre-labeled images (each with a designation of either "car" or "truck"). After seeing continual examples of what a car and a truck look like, a model (or human for that matter) can start to pick out the unique characteristics of a truck and develop a prediction of whether a new image is actually a truck or a car.

This idea of training based on known outcomes is used in a lot of fields, including image classification, anti-spam, and anti-fraud.

Unsupervised Learning

Not everything in data science has the benefit of pre-defined data labels, though. And so we have another type of learning algorithm: unsupervised learning. In this approach, the model is challenged with recognizing differences/anomalies but not necessarily within a pre-defined label bucket.

Take, for example, online shopping recommendations. Retailers aren't necessarily going to know exactly what a customer will buy... but they can identify a statistical probability of what someone will buy based on looking at items that are frequently bought together.

Reinforcement Learning

The last "main" type of learning algorithm is based on simple trial and error. It's the idea of learning through doing and receiving some sort of feedback in terms of rewards or penalties. It's a popular technique for things like game playing, robotics, and autonomous driving. Another cool benefit is that this type of learning doesn't have to happen at the same pace as human learning. A machine can potentially learn through simulations that run at a much faster rate.

A great example of this is OpenAI Five, an AI system built to play Dota 2 (a popular and notoriously complex team-based online video game). It learned by playing against itself, with no human gameplay data to start from. In its earliest games, the bots just wandered around the map aimlessly. But by earning rewards for things like destroying enemy towers and winning the game, they gradually picked up real strategies. And because it was all happening in simulation, OpenAI Five was at one point playing roughly 180 years' worth of games every single day. Fun fact: in April 2019, it became the first AI to beat the reigning world champions (Team OG) in an esports game.

Conclusion

This just barely scratches the surface but hopefully serves as a good primer. Experts who are familiar with the topic will note that I've neglected to mention deep learning. I'll save that for a future article.

In the meantime, for more information on this article's topics, check out the following links:

What Are Machine Learning Algorithms? | IBM
A machine learning algorithm is the procedure and mathematical logic through which an AI model learns patterns in training data and applies to them to new data.
What Are Machine Learning Algorithms? | Microsoft Azure
Learn what machine learning algorithms are, how they work, and why they matter. Explore types, uses cases, and their role in AI-assisted systems.
Machine Learning Algorithms - GeeksforGeeks
Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more.
What Is Machine Learning (ML)? Definition and Examples
Get a simple definition of machine learning (ML) from UC Berkeley. Learn how ML works, explore the main types, and see real-world examples and applications.