Topic 01 / 12

What Is Machine Learning, Really?

~8 min read  //  AI & ML Series  //  Coding India

Programs That Learn from Data

Classic software is rules you write by hand: if total > 10000: flag_order(). Machine learning flips that — you show the computer thousands of examples of flagged and clean orders, and it derives the rules itself. The output of training is a model: a function with learned parameters that maps inputs to predictions.

ML wins when the rules are too subtle, too numerous, or too fast-changing to hand-write: spam detection, price prediction, image recognition, recommendations.

The Three Families

  • Supervised learning — you have labelled examples (inputs and the right answer). Predicting house prices (regression) or spam/not-spam (classification).
  • Unsupervised learning — no labels; find structure. Customer segmentation (clustering), compression (dimensionality reduction).
  • Reinforcement learning — an agent learns by acting and receiving rewards. Game-playing, robotics, ad bidding.

This series focuses on supervised and unsupervised learning — they cover the vast majority of ML shipped in industry.

The Workflow You’ll Repeat Forever

  1. Frame the problem — what do you predict, and what decision does the prediction drive?
  2. Get and clean data — usually 70% of the work.
  3. Split the data — train on one part, evaluate on data the model has never seen.
  4. Train a baseline — the simplest model that could possibly work.
  5. Evaluate honestly — with metrics that match the business problem.
  6. Iterate — better features usually beat fancier models.
  7. Ship and monitor — models decay as the world changes.

Environment Setup

python3 -m venv .venv
source .venv/bin/activate
pip install numpy pandas scikit-learn matplotlib jupyter

Verify everything imports:

python3 -c "import numpy, pandas, sklearn; print(sklearn.__version__)"

We’ll use scikit-learn for classical ML and add PyTorch when we reach neural networks. Jupyter notebooks are ideal for exploration; production code goes in .py files.

One Mental Model to Keep

Every supervised algorithm in this series — linear regression to deep networks — does the same thing: pick parameters that minimise a loss function measured on training data, and hope the result generalises to new data. Hold onto that sentence; it makes everything else click.