skipnothing/ML Foundations

When ML Works (and When It Doesn't)

You could write if income < 12000: tax = 0 in one line, and you should. Other problems bury their answer in examples no line you type will ever catch, and telling the two apart comes first.

  • ▸ML is not the default: if you can state the logic in a line, a plain rule wins
  • ▸All four conditions must hold at once, and the one that fails tells you what to do instead
  • ▸A skewed million examples lose to a representative thousand; more rows never close the gap
BUILDS ON
01

When a Rule Beats a Model

Not every problem is an ML problem. Some hand you the logic outright. Tax owed on the first bracket is if income < 12000: tax = 0, one line, exact, and it never guesses. Checking whether a number is even, whether a password clears eight characters, same story: you already know the logic, so you write it. A trained model here would only learn to approximate a line you could have typed, and approximate means sometimes wrong.

Now try to write the logic for "is this email spam". You start typing: contains "free", all caps, a suspicious link. Every clause you add catches a little more and misses a lot, and the moment the junk mutates to "Fr€€" your clause is blind again. The signal is real but too tangled to spell out, buried in thousands of examples that no if chain reaches. Cat-versus-dog from raw pixels is worse: there is no line you can write over pixel values that says "cat".

So the first fork is cheap and it comes before everything: can you state the logic in a line or two? If yes, write it, you get an exact, instant, free answer and you are done. If no, the pattern lives in the data and only then is a model on the table. ML is the tool for the problems you cannot write down, not a fancier way to do the ones you can.

WRITE THE RULE, WATCH IT HIT 100% OR PLATEAU

Keep going, sign up to unlock the rest

3 more parts in this topic, plus 12+ more topics in ML Foundations.

Sign up, it's freeSee the full ML Foundations
What is Machine Learning?0/4#3 How Models Learn
#5 Data Types for ML