1. Classifications of Machine Learning
So far, we have learned how models classify items into binary options (Lesson 1) and predict continuous numbers (Lesson 2).
Today, we explore the two main branches of Machine Learning architectures:
• Supervised Learning: The computer learns with an answer key (Labeled Data).
• Unsupervised Learning: The computer finds hidden patterns on its own (Unlabeled Data).
Let's step through both types with visual sorting simulations to see the difference.
2. Supervised Learning: Labeled Stickers
In Supervised Learning, we feed the model data that has already been labeled with the correct answer (the target sticker).
Adjust the sliders to slide and rotate the blue decision line on the conveyor chart. Because the fruits have stickers showing **"Apple"** or **"Orange"**, the algorithm has an answer key to evaluate and train its line!
3. Unsupervised: Clustering the Unknown
Now, imagine you land on an alien planet and find a massive pile of strange, unknown items. There are **no stickers, no labels, and no answer key**.
This is Unsupervised Learning. We ask the AI to find patterns without tellings it what to look for. Click "Group Objects" and watch the AI sort by structural shape and texture similarity!
4. Notebook Playground: Customer Personas
Let's use Unsupervised Clustering to discover hidden customer personas in a messy retail database. Run Cell 1 to load the data, then follow prompts to set `k` (the cluster count) in Cell 4.
import pandas as pd
data = pd.read_csv("customer_spending.csv")
print(data.head())
import matplotlib.pyplot as plt
plt.scatter(data['age'], data['spending_score'], color='gray')
plt.show()
plt.scatter(data['age'], data['spending_score'], c=labels, cmap='rainbow')
plt.title("Discovered Customer Personas")
plt.show()
5. Core Concept Summary
You have completed Lesson 3! Let's review the cheat sheet for classifications of machine learning.
• **Use Cases:** Spam filters (Spam vs. Not Spam), Medical diagnosis imaging (Tumor vs. Benign), Employee churn prediction.
• **Use Cases:** Customer segmentation (marketing), Netflix/Amazon recommendation engines, transaction fraud anomaly detection.