ML Atlas

What is Machine Learning?

A practical introduction to learning systems before algorithms.

Beginner
18 min read
Basic data literacyComfort reading simple tables and charts
  • Spam filtering in email clients
  • Fraud detection in payments
  • Product recommendations in e-commerce
  • Demand prediction in operations planning
01

In Plain English

Machine learning is a way to build software that improves pattern-based decisions from examples instead of hardcoded rules.

Why It Exists

Rule-based systems fail when patterns are too many, too noisy, or change too fast. ML absorbs those patterns from data.

Problem It Solves

It maps inputs to outputs when exact rules are hard to write but good historical examples exist.

Real-Life Analogy

"Rule-based: fixed checklist. ML: train a new teammate using many examples until they can make good calls on unseen cases."

When To Use

  • Patterns change over time
  • Rules are too complex to maintain
  • You have enough representative labeled or unlabeled data

When NOT To Use

  • Simple deterministic logic is enough
  • No reliable data pipeline exists
  • The cost of wrong predictions is very high and not well controlled
02

In ML, learning means finding parameters that reduce prediction error on training data while still generalizing to unseen data.

A model is a parameterized function. Training adjusts parameters; inference uses frozen parameters to predict for new inputs.

Models fail when data quality is poor, assumptions are wrong, evaluation is weak, or the data distribution shifts in production.

The Metaphor

"Think of a model as a lens you tune. Training focuses the lens on useful signal; bad data or wrong setup leaves it blurry."

Beginner Mental Model

Training = learning from past examples. Inference = applying that learned behavior to new cases.

03

Given samples from a distribution, optimize model parameters theta to minimize expected loss while controlling generalization error.

Model
A function family that maps features to predictions.
Parameters
Learned internal values (weights, thresholds) updated during training.
Training
Optimization process that minimizes loss on training examples.
Inference
Using the trained model to make predictions on new data.
Generalization
Performance on unseen data, not just training data.
  1. 1. Define task and success metric.
  2. 2. Gather and prepare data.
  3. 3. Choose model family and loss.
  4. 4. Train on training split.
  5. 5. Evaluate on validation/test.
  6. 6. Deploy with monitoring.

Feature vectors (and labels for supervised setups).

Predictions: continuous values, classes, scores, or rankings.

01Training and production data are related distributions.
02Labels are reasonably reliable for supervised tasks.
03The chosen metric reflects business quality.
  • Data drift after deployment
  • Spurious correlations
  • Label leakage
04

This topic anchors the rest of the course and explains why each later step exists.

  • 01.Define target outcome and prediction timing.
  • 02.Validate feature availability at inference time.
  • 03.Set a baseline before complex modeling.
  • 01.Start with a simple baseline model.
  • 02.Iterate with better features and regularization.
  • 03.Track train/validation gap continuously.

Model complexity

Capacity of the model class.

Start low, scale only when justified by validation gain.

  1. 1Frame the task as prediction
  2. 2Select metric
  3. 3Build dataset
  4. 4Train baseline
  5. 5Evaluate and iterate
05
06
python
1# 1) X, y prepared
2# 2) split train/val/test
3# 3) fit model
4# 4) evaluate
5# 5) iterate
The same flow applies across most ML problems.
Features: user_history, device_type, session_time
Prediction score: 0.82
  • Good data and evaluation usually matter more than fancy models.
  • Inference-time constraints should shape training-time decisions.
  • Skipping baselines
  • Optimizing the wrong metric
  • Using leaked features
07
table

Structured tabular data

Excellent

Strong fit for most introductory ML setups.

💡 Prefer clear feature definitions and stable schemas.
alert-triangle

Tiny or sparse datasets

Context-Dependent

Can work with simple models but uncertainty rises.

💡 Use cross-validation and conservative complexity.
08

Mandatory Visual Blueprint

What should move

At least one parameter, threshold, split, cluster state, or metric should change interactively.

What to observe

The learner should see how the concept affects error, fit, grouping, or decision quality.

Planned visual type

Interactive chart, step animation, or side-by-side failure-mode comparison.

Reference image slot

If no live lab exists yet, attach a relevant diagram/reference image before marking the page complete.

Topic key: ml-what-is-machine-learning

Rule-based vs ML Scaling

As pattern complexity grows, hardcoded rules become harder to maintain than learned models.

Concept chart: rule maintenance cost rises superlinearly; ML improves with data quality and volume.

Training vs Inference Loss Profile

Training minimizes loss; inference quality is judged on unseen examples.

Gradient descent convergence — MSE decreasing over iterations

09
  • Adaptability

    Learns changing patterns from data updates.

  • Scalability

    Handles high-dimensional decision patterns better than hand rules.

  • Data Dependence

    Poor data quality gives poor behavior.

  • Monitoring Burden

    Needs drift and performance monitoring post-deployment.

10
Fintech

Fraud scoring

Flags high-risk transactions in real time.

Retail

Demand prediction

Forecasts SKU-level sales for planning.

11

ML differs from deterministic systems mainly in learning behavior and maintenance dynamics.

Rule-based Systems

Both produce deterministic outputs for fixed inputs.

Rules are explicitly encoded; ML parameters are learned from data.

Small problem space with stable logic.

Machine Learning

Both support decision automation.

ML generalizes from data and can adapt with retraining.

Complex or changing pattern space.

AspectRule-basedML
Change HandlingManual rule updatesRetrain with new data
TransparencyHighVaries by model

Use ML when robust examples exist and fixed rules are brittle.

12

Accuracy / F1 / AUC

Classification quality, task-dependent.

RMSE / MAE

Regression error magnitude.

  1. 01.Define metric by business objective
  2. 02.Evaluate on holdout data
  3. 03.Compare against baseline
  • Using only training metrics
  • Ignoring class imbalance
  • No calibration checks for probabilities

A model with lower RMSE but unstable drift behavior may still be worse in production.

13
  • ×Treating ML as just model APIs instead of system design.
  • ×Skipping feature availability checks at inference.
  • ×Confusing training loss with business success.
  • ×No monitoring or retraining trigger policy.
14

What kind of bias does this model have?

Bias depends on model assumptions and feature expressiveness.

What kind of variance does it have?

Variance grows with model flexibility and weak regularization.

How does it overfit?

Overfitting usually appears as strong train performance but weaker validation/test behavior.

How do we regularize it?

Use complexity constraints, robust validation, and data-centric cleanup.

What kind of data does it like?

Prefers representative, low-leakage data with stable feature definitions.

What kind of data breaks it?

Breaks under leakage, severe distribution drift, noisy labels, and poorly engineered features.

14

Quick Revision Reference

  • ML learns parameters from examples.
  • Training and inference are separate stages.
  • Generalization is the real objective.
ERM
  • Pattern-rich tasks with good data coverage
  • Strict deterministic logic with no data uncertainty
Explain model, parameters, training, inference clearly.
Explain why models fail in production.
15
16

These questions are designed to break assumptions and expose weak understanding. Most people will answer them wrong on their first attempt. Work through each one carefully.