Skip to content
VJ Classes

One place to learn science, commerce, arts, computers and life skills

Traditional programs follow rules written by people: “if the amount is above ₹50,000, ask for an extra password”. Machine learning works differently: the program is shown many examples, and it adjusts itself to find the patterns that connect inputs to outputs.

An example: spotting spam

Instead of listing every spam word, we give a learning system thousands of emails already labelled “spam” or “not spam”. It learns which features (words, senders, links, timing) tend to go with spam. Shown a new email, it predicts a label. When it makes mistakes and we correct them, it can improve.

Three main types of learning

TypeHow it learnsExample
Supervised learningFrom labelled examples (input with the correct answer)Spam detection, predicting house prices, recognising handwritten digits
Unsupervised learningFrom unlabelled data, finding structure on its ownGrouping customers with similar buying habits
Reinforcement learningBy trial and error, receiving rewards or penalties for actionsGame-playing systems, robot control

Modern chatbots combine these: they are first trained on vast amounts of text, then refined with human feedback.

Neural networks, simply

A neural network is made of layers of simple units. Each connection has a weight, a number that says how much one unit influences the next. During training, the network makes a prediction, measures its error, and adjusts millions or billions of weights slightly to reduce the error. Repeated over huge numbers of examples, the network becomes good at the task. Nobody writes the rules; they are encoded, in a form that is hard for humans to read, in the weights.

Training, testing and overfitting

Data is split into a training set (to learn from) and a test set (held back to check performance on examples the system has never seen). A system that memorises its training data but performs poorly on new data is overfitting, like a student who memorises last year’s answers but cannot solve a new question.

Why machine learning took off

Three things came together in the 2010s: data (the internet, smartphones and digitised records), computing power (especially graphics processing units, GPUs) and better algorithms. Remove any one, and progress slows.

A model that learnt the wrong lesson

Researchers have reported image classifiers that seemed excellent at recognising an animal, but had actually learnt to recognise the background that usually appeared with it in the training photos (snow, for example). Shown the animal on grass, they failed. The system learnt a shortcut, not the concept. This is why testing on new, varied data matters.

Try this

Think of a decision you make often (for example, whether a mango is ripe). Write down the “features” you use and an example of a labelled case. You have just described a supervised learning problem.

Key points

  • Machine learning learns patterns from examples instead of following hand-written rules.
  • Supervised (labelled), unsupervised (unlabelled) and reinforcement (rewards) learning.
  • Neural networks learn by adjusting weights to reduce errors.
  • Test on unseen data to avoid overfitting; data, computing power and algorithms drove progress.