Supervised & Unsupervised Learning

Supervised & Unsupervised Learning

Welcome back to another edition of Demystifying Artificial Intelligence! Last week, we covered the fundamentals of how machines learn from data. We also introduced the concepts of Supervised and Unsupervised Learning. This week, we will recap and dive a bit deeper into these concepts. We’ll explore what sets them apart, how they’re used, their strengths and limitations, and where a hybrid approach – called Semi-Supervised Learning – fits in.


Supervised Learning: Training with Labeled Data

Supervised learning involves training a model on labeled data to predict outcomes accurately. As I mentioned last week, supervised learning is similar to someone teaching a person exactly what they want the student to know.

Imagine teaching a child how to recognize a cat using flashcards. Each card (i.e., each data point) shows both the input (an image of a cat) and the “correct” outcome (in this simple example, labeling the picture as a cat). In supervised learning, algorithms train using these labeled datasets to learn the relationship between input features and the desired output. The goal is for the model to make accurate predictions on new, unseen data by recognizing these learned patterns. And as always with machine learning, the more data the better. If a child is shown a million flashcards with different pictures of cats, the more likely they will be able to identify a previously-unviewed picture of a cat as a “cat.” 😊

Just in case you’re not into cats (I’m really a dog person myself!), here are a couple of real-world examples:

Fraud Detection: Banks use supervised learning to spot fraudulent transactions. They feed the algorithm thousands/millions of examples of transactions labeled as either “fraud” or “not fraud.” The model learns which patterns are associated with fraud, and it flags suspicious activity in real time.

Email Spam Classification: Email providers use supervised models to filter spam. By training on emails labeled as “spam” or “not spam,” the model learns to recognize the telltale signs of unwanted messages and help keep your inbox a little cleaner.

There are several common algorithms used to train machines using supervised learning. I’ll give a brief description, but if you’re really curious, please feel free to follow the links below to dig even deeper:

➡️ Decision Trees: Decision trees split data into “branches” based on feature values, making them easy to interpret and useful for both classification and regression tasks. Think of this as a way to draw a diagram of all the possible outcomes from a situation (e.g., coin flip – heads or tails, drawing a card – 1 of 52 possibilities if you don’t count jokers), and the probability of each outcome happening. If you’ve ever taken a statistics course in college, you almost certainly learned about decision trees.

➡️ Logistic Regression: This one gets pretty technical, and I won’t bore you (check the link if you’re into that sort of thing!). Logistic regression is often used for binary classification (e.g., “Yes/No” or “True/False” answers, like a message is either “spam” or “not spam”), logistic regression predicts the probability of a data point belonging to a particular class by mapping data on a scale of zero (no chance) to 1 (100% chance).

➡️ Support Vector Machines (SVM): If you thought the Logistic Regression page got into the weeds… phew! SVM goes into some crazy math. SVMs are powerful for tasks like text and image classification, drawing boundaries between “classes” of data points in high-dimensional spaces. ‘Nuff said.

➡️ Random Forests: By combining multiple decision trees, random forests boost accuracy and reduce overfitting (recall from last week: overfitting is when the model considers valid data as “noise” and ignores it from decisions). The “random” part of this is pretty cool – when multiple decision trees form an “ensemble” together in a random forest algorithm, they predict more accurate results, particularly when the individual trees are uncorrelated with each other. Pretty crazy!

There are a couple of trade-offs related to Supervised Learning:

•       The Good – Precision: Supervised Learning delivers highly accurate predictions… if you have enough labeled data.

•       The Downside – Data Requirements: Creating large, high-quality labeled datasets is time-consuming and expensive, especially for complex or unstructured data.


Unsupervised Learning: Finding Hidden Patterns

In contrast, unsupervised learning explores data without predefined labels, aiming to uncover hidden patterns or structures.

Compared to the previous “cat” example, unsupervised learning is more like giving a child a box of puzzle pieces that will become a picture of a cat when the puzzle is finished, but they’re not given a picture to guide them. The algorithm receives data without labels and must figure out patterns on its own. This approach is ideal for exploring data and uncovering insights that might not be obvious.

Real-World Examples – We touched on these examples last week, but here is a bit more:

Customer Segmentation: Marketers use unsupervised learning to group customers based on their purchasing behavior, demographics, or preferences. These segments help tailor marketing strategies and improve customer satisfaction. You’re much more likely to buy something if the advertisement feels like it’s tailored to your tastes. There is a very good reason why there are lots of beer commercials shown during NFL games, and also a good reason why cable news channels show a lot of commercials for life insurance and reverse mortgages. It works the same way with online marketing!

Clustering: In general, clustering algorithms group similar data points together, revealing natural groupings within the data—such as different types of users or products. The example I gave last week: A streaming service analyzes viewing habits and clusters users with similar tastes to make “personalized” recommendations, even if they don’t know exactly what those tastes are.

Common methods of performing unsupervised learning:

➡️ K-Means Clustering: This popular algorithm divides data into “k clusters” based on similarity. Each data point is assigned to the nearest cluster center (called the centroid), and the process repeats until the clusters stabilize.

➡️ Hierarchical Clustering: This method builds a tree of clusters, useful for visualizing relationships and groupings in data. Hierarchical clustering either works from a “bottom-up” approach (Agglomerative), or a “top-down” approach (Divisive). In the bottom-up method, it starts with each data point being its own cluster, and the algorithm tries to group as many things together as possible. The top-down method works the other way – it starts with everything in one cluster, and tries to divide it into subsets.

Similar to Supervised Learning, there are a couple of trade-offs related to Unsupervised Learning as well:

•       The Good – Exploratory Power: Unsupervised learning excels at discovering hidden patterns and relationships in unlabeled data.

•       The Downside – Less Structure: Because there are no labels, results can be subjective and harder to evaluate. The insights depend on how well humans interpret the discovered patterns. So, Artificial Intelligence meets Human Intelligence!


Recap of Supervised vs. Unsupervised Learning: Precision vs. Exploration

Supervised learning offers precise predictions but requires extensive labeled data, which can be costly and time-consuming to acquire. On the other hand, unsupervised learning is exploratory and can uncover insights from unstructured data, making it versatile but less precise without labeled guidance.


Semi-Supervised Learning: The Best of Both Worlds

So… when people can’t figure out which method to use, what do they do? Mash them together! Semi-supervised learning combines elements of both supervised and unsupervised learning. It leverages a small amount of labeled data alongside a larger pool of unlabeled data to improve learning efficiency and accuracy, bridging the gap between precision and scalability when training models. This is especially useful when labeling data is costly but unlabeled data is plentiful—think of the millions (Or billions? More?) of images or documents generated daily.

Good example: Semi-supervised learning is used in image and speech recognition, web content classification, and more, where labeling every data point is impractical.


Business Applications

Supervised learning excels in applications requiring precise predictions with well-defined outcomes, such as medical diagnosis or financial forecasting. Unsupervised learning finds applications in exploratory data analysis, anomaly detection, and recommendation systems where uncovering hidden patterns or structures is key. Below is a table showing some of the applications in the business world:

Article content

Summary

➡️ Supervised Learning is your go-to for tasks where labeled data is available and accuracy is critical, like fraud detection, medical diagnosis, or spam filtering.

➡️ Unsupervised Learning is ideal for exploring data, segmenting customers, or finding new patterns when you don’t have labeled examples.

➡️ Semi-supervised Learning offers a practical compromise, using a mix of labeled and unlabeled data to build effective models when labeling is a bottleneck.

Understanding these approaches—and when to use each—will help you unlock the full potential of AI in your business or research.


Coming Up:

Next week, we’ll take a look at Neural Networks, where AI and Deep Learning begin to mirror how the human brain processes neurons. Stay tuned!

Thanks for reading, and as always, feel free to share your thoughts or questions. See you next week!


🚀 What aspects of AI intrigue you the most? What aspects scare you the most? Drop a comment in the thread!

🚀 Follow me and subscribe to the newsletter for more weekly insights into AI, digital transformation, and cybersecurity.

🚀 Book a meeting with me: I'd love to chat more about AI and intelligent automation, and explore ways to collaborate – no pressure!

#ArtificialIntelligence #IntelligentAutomation #DigitalTransformation


Uti Wisdom

ND Environmental Science Student | Aspiring Python Programmer | Building Solutions in Data Science & GIS

2w

Thanks for sharing, Sir Steve Earley

To view or add a comment, sign in

More articles by Steve Earley

  • Demystifying AI: Data – The Fuel of AI

    Welcome back to Demystifying AI! Last week, we explored neural networks – the digital brains powering today’s most…

    1 Comment
  • Demystifying AI: Neural Networks

    Welcome back to another edition of Demystifying AI! Building on last week’s exploration of how machines learn, this…

  • How Do Machines Learn?

    Welcome back to Demystifying Artificial Intelligence! In our previous editions, we explored what AI is, traced its…

    1 Comment
  • AI… Machine Learning… Deep Learning… What’s the Difference?

    Welcome back to Demystifying Artificial Intelligence, where we cut through the jargon and explain AI in user-friendly…

    3 Comments
  • The History of AI

    Welcome back to “Demystifying Artificial Intelligence,” where we break down AI concepts into clear, digestible…

    1 Comment
  • What is Artificial Intelligence?

    Hello! Do you sometimes find yourself thinking: "I keep hearing a lot about AI, I know it's the hot topic these days…

    2 Comments
  • What is Artificial Intelligence?

    Hello! Do you sometimes find yourself thinking: "I keep hearing a lot about AI, I know it's the hot topic these days…

    1 Comment

Insights from the community

Others also viewed

Explore topics