← All articles
mathdatadecisionsreasoningSeptember 17, 20263 min read

How Do You Turn a Judgement Into a Flowchart? Ask Yes or No Repeatedly

By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.

Splitting a population by one question at a time, and then splitting each resulting group again, produces a branching structure that classifies anything by following a path down it. The method is old, transparent and surprisingly effective.

How one is built

Building starts with the whole set of examples and asks which single question divides them most usefully, meaning which one produces groups that are internally more alike than the original. The set is split on that question, and the procedure repeats separately within each resulting group, choosing the best question for that group alone, and continues until the groups are sufficiently uniform or too small to split further. The result is a branching structure in which every path from the top to a leaf is a sequence of conditions, and classifying a new case means answering those questions in order and reading off the outcome at the end.

Why they are used so widely

Several properties account for their persistence:

  • The result is readable, since the path taken explains the answer directly
  • Both numeric and categorical inputs are handled without preparation
  • No assumption about the shape of the underlying relationship is needed
  • Missing values can be handled without discarding the case
  • Training is fast and the result applies instantly
  • The structure can be printed and followed by a person with no computer

The problem of learning too well

The characteristic failure is fitting the training examples too closely, and the mechanism is easy to see. Allowed to continue splitting, the procedure will eventually isolate every individual example in its own leaf, at which point it describes the training data perfectly and generalises to nothing, since it has memorised rather than learned. That is addressed by stopping early, by requiring a minimum number of examples in any leaf, or by growing the structure fully and then pruning back the branches that do not improve performance on data held aside. Judging where to stop requires data that was not used in building it, which is the central discipline in the whole field.

Where they are used to decide things

Structures of this kind are written by hand as well as learned from data, and the hand-written ones carry real authority. Clinical guidelines present diagnosis and treatment as branching questions precisely because a clinician can follow one under pressure and can see why it reached its conclusion. Emergency procedures for aircraft and industrial plants are the same. Triage systems sort patients by a short sequence of observations. Legal tests are frequently expressed this way. Loan and insurance decisions use them where regulation requires that a refusal be explainable. In each case readability is the reason for choosing this form, and a more accurate method whose reasoning cannot be stated would not be acceptable.

What is built from them

Individual structures are unstable, since a small change in the data can produce a completely different set of splits, and the modern response is to build many and combine them. Growing hundreds on random subsets of the data and of the available questions, then averaging their answers, produces a far more accurate and stable result at the cost of the readability that made a single one attractive. Building them in sequence, with each correcting the errors of those before, produces methods that are among the strongest available for structured data and that dominate practical competitions. Both approaches are ensembles of exactly the simple structure described, which is why it remains fundamental despite rarely being used alone.

The takeaway

Splitting a set on the question that makes the resulting groups most uniform, and repeating within each group, builds a structure where every path is a sequence of conditions leading to an answer. Readability, handling of mixed inputs and speed explain the persistence. Allowed to continue, the procedure memorises rather than learns, which pruning addresses. Combining hundreds of them produces the strongest methods available for structured data.

Practise this

Questions from Thinking and Cognition

Reading about something is not the same as being able to recall it. These are real questions from the Thinking and Cognition unit in our Psychology track, answers and explanations included. The unit has 120 in total across 23 steps.

  • True or falseLevel 1

    1. The words and language we use can shape the way we think.

    Answer: True

    True. Psychologists find that language can influence how we notice and describe the world.

  • Odd one outLevel 1

    2. Which word does NOT belong with the others?

    • Sleepingcorrect
    • Deductive
    • Inductive
    • Logical

    Sleeping is not a kind of reasoning; the others are ways of thinking things through.

  • Match the pairsLevel 3

    3. Match each bias to what it does.

    Answer: Confirmation bias = Seeking only agreeing evidence; Anchoring = First number sticks in your mind; Hindsight bias = Feeling you knew it all along; Availability heuristic = Easy examples feel common

    Each bias twists judgment in its own way, from seeking agreement to leaning on the first fact.