Machine learning is a way of building software that learns a task from examples, instead of following rules a programmer wrote by hand. It powers spam filters, recommendations and photo search, and the core idea fits in one sentence: show the computer enough labelled examples and it finds the patterns for you.
Why hand-written rules break
Say you want a program that sorts tuna into good and bad. The obvious start is to write the rules yourself:
def is_good(tuna):
if tuna["shiny"]:
return True
if tuna["smelly"]:
return False
return TrueThis works on the first few fish you test. Then a shiny tuna turns up that smells off, and the first rule calls it good. You add a rule for that. Then comes a dull tuna that is perfectly fresh, then a firm one with a faint smell. Every fix adds another branch, the branches start to contradict each other, and soon nobody can say which rule wins.
That is the problem machine learning solves. Some tasks are easy for a person to judge but very hard to write down as exact rules: is this email spam, is this a photo of a cat, will this viewer like this video. When the rules would run to hundreds of special cases, it is often easier to collect examples of the right answer and let the computer work out the rules.
Learning from examples instead
In machine learning you don't write the decision logic. You write a program that learns it from data.
Wondering how this was made? How we make these