Machine Learning

From ForcaWiki, the simple encyclopedia

Machine Learning
In one sentenceTeaching a computer program to get better at a task by showing it a huge pile of examples, instead of writing exact step by step instructions for every situation.
CategoryMathematics
RelatedProbability, Linear Algebra, Lagrange Multiplier

Think about how you learned to tell a dog from a cat when you were little. Nobody handed you a rulebook with exact measurements, like "if the ears are exactly this tall, it is a cat." Instead, you just saw plenty of dogs and cats, with someone naming them out loud each time, and your brain gradually picked up on the pattern by itself.

Machine learning is that same basic idea, but for computer programs. Normally, a programmer writes exact instructions for every single situation a program might run into. With machine learning, the programmer instead shows the program a huge pile of examples, like thousands of photos already correctly labeled "dog" or "cat," and the program slowly adjusts itself to get better and better at telling them apart on its own.

Learning from mistakes, over and over

Inside a machine learning program are enormous numbers of adjustable settings, sometimes called weights, kind of like thousands of tiny dials. When the program looks at an example and guesses wrong, a process called training nudges those dials a tiny bit in whatever direction would have made that guess more correct. Do this millions of times across millions of examples, and the dials slowly settle into values that work well, not just on the examples it already saw, but on brand new ones it has never seen before.

Under the hood, all of that nudging is really just a giant optimization problem: finding the exact dial settings that make the fewest mistakes. That is close cousin territory to a Lagrange Multiplier, which handles the simpler case of finding the best answer to a problem while also obeying a rule.

Built out of math you already know about

Machine learning leans hard on math that already has its own place in ForcaWiki. Every one of those adjustable dials is really just a number inside an enormous vector or matrix, and training a program means multiplying and adjusting huge grids of these numbers over and over. When a machine learning program finally makes a guess, like "this photo is 92 percent likely to be a cat," that percentage is a Probability, a number describing how confident the program is rather than a flat out yes or no.

Where you already run into it

  • Streaming apps use it to guess which shows or songs you might like next, based on what people with similar taste have enjoyed before.
  • Voice assistants use it to turn the sound of your voice into written words.
  • Email apps use it to guess which messages are spam before you ever see them.
  • Photo apps use it to recognize faces, pets, and objects in your pictures automatically.

Fun facts

  • The term "machine learning" was coined in 1959 by Arthur Samuel, an engineer who used the idea to build a computer program that got better at playing checkers the more it played.
  • A modern, large machine learning program can have billions of adjustable dials inside it, far too many for any person to set by hand.
  • Despite the name, these programs do not understand or think about anything the way people do. They are extremely good pattern matchers, nothing more, which is part of why they can be confidently wrong in ways a person usually would not be.