












Supervised learning is a type of machine learning where the algorithm is trained on a labeled dataset, meaning that each input data point is paired with the correct output. In contrast, unsupervised learning involves training the algorithm on an unlabeled dataset, allowing it to find patterns and relationships within the data on its own.
Another Example: The Pizza Delivery Tips Prediction
Imagine you’re training a model to predict which pizza orders will tip well. You have a bunch of samples (previous pizza deliveries), and each delivery is described by features (facts about the delivery), with a label (whether they tipped well or not). Let’s break it down:
- Sample: A single pizza order.
- Features: The things that describe the order, like:
- Time of day (Feature 1: Did they order at 2 AM?)
- Type of pizza (Feature 2: Extra cheese? Anchovies?)
- Distance to their house (Feature 3: 3 blocks away or 20 miles?)
- Tip history (Feature 4: Frequent big tipper or never tips?)
- Label: The outcome you’re trying to predict—whether the person gave a good tip (Label: “Good Tip” or “No Tip”).
Discover more from Science Comics
Subscribe to get the latest posts sent to your email.