Skip to main content
Machine Learning & Deep Learning

⏱ About 10 min10 XP

When Sorting Is Tricky

Have you ever tried to sort something and felt stuck? Maybe you had a crayon that was between red and orange, and you could not decide which color bin it belonged in. That feeling of being stuck is very real — and sorting machines feel something like it too. In this lesson we learn why some things are hard to sort and what we can do about it.

In-Between Cases

Most apples are clearly red or green. But some apples are yellow. Is a yellow apple a red apple that did not quite finish turning? Or its own thing? These in-between cases are the hardest part of sorting. The clues overlap. A ripe yellow banana is yellow. A lemon is also yellow. If the only clue is color, both would land in the same group — but they are very different fruits! Sorting machines run into this problem too. When examples from two different groups look very similar, the machine can get confused and make mistakes.

The Big Idea

In-between cases are examples that look like they could belong to more than one group. They are the hardest examples for any sorter — human or machine — to handle.

Here is a story. A sorting machine is learning to tell cats from dogs using photos. Most cats have pointed ears and most dogs have floppy ears. Easy! But then along comes a photo of a dog breed with pointy ears — like a German Shepherd. The machine sees pointy ears and guesses 'cat.' That is a sorting mistake caused by an in-between clue. The more different clues a machine uses — ears AND face shape AND fur pattern AND size — the less likely one tricky clue will fool it.

Fill in the missing word.

When a machine uses more to sort, it is less likely to be fooled by one tricky example.

Sometimes there is no perfect answer. A tomato is botanically a fruit but most people cook it like a vegetable. If your sorting rule is fruit or vegetable, a tomato is a genuinely hard case. In real machine learning, experts sometimes create a third group — like 'other' or 'uncertain' — for things that do not clearly fit anywhere. That honesty is better than forcing a wrong label.

Do Not Force a Wrong Label

If an example really does not fit neatly into any group, it is better to set it aside or create an 'other' group than to label it wrong. A wrong label teaches the machine the wrong lesson.

Why are in-between cases hard for sorting machines?

What helps a machine handle tricky cases better?

The Tricky Sort Challenge

  1. Collect 8 to 10 small objects — a mix of easy and tricky ones.
  2. Choose a sorting rule with two groups, like 'soft' and 'hard.'
  3. Sort the easy objects first.
  4. Now look at the leftover tricky ones. Why are they hard to place?
  5. For each tricky object, talk about which clues make it tricky.
  6. Decide together: force a label, or create a third group called 'in-between'?
  7. This is exactly the conversation real machine-learning teams have!