What it does

A decision tree is like a question game. It asks simple yes-or-no questions until it reaches an answer.

Root: Starting question • Leaf: Final outcome

How it works

  • Start with one question at the top.
  • Follow the yes or no path that matches the item.
  • Stop at the final box. That box is the answer.

Uses & Applications

  • A store can decide which shelf a product belongs on by asking questions like “Is it food?” or “Is it fragile?”
  • A game can guess an animal by asking questions like “Can it fly?”
  • A website can help support teams send a question to the right person.
In short

It works like 20 Questions. It keeps asking simple questions until it reaches a final label.

Try it yourself

Help sort a fruit basket

Teach the computer to tell pretend apples and berries apart. It learns questions about size and sweetness.

Your turn

Change one setting at a time. Reset example puts everything back.

Follow a decision path

Step 1
Why this happens

Look closer at the numbers
Numbers used in this example