What Is Machine Learning?
Lesson opener
In one line: What machine learning is - and how it differs from fixed rules and dashboards.
Why it matters: Fixed Excel rules break when behaviour shifts (new festival season, new product line). A model retrained on fresh data adapts.
Before this lesson: Statistics for AI & ML / Pandas basics / Math for ML
Before you start
| Resource | Link |
|---|---|
| Previous | eˣ, log & loss |
| Next | ML workflow end to end |
| Prerequisites | Statistics for AI & ML (stat0–stat4), Pandas basics; optional Math for ML if symbols feel intimidating |
| Time | ~35 minutes |
What you will learn
- What machine learning is — and how it differs from fixed rules and dashboards
- The three learning types: supervised, unsupervised, and reinforcement learning
- Why reinforcement learning is not the same thing as deep learning
- How this course sequence builds from regression → features → sklearn → advanced models

What is machine learning?
Plain English: Machine learning is software that learns patterns from data instead of following only hand-written rules. You show examples — past customers who churned or stayed, past ad spend and revenue — and the program adjusts internal parameters so it can predict or classify new cases it has never seen.
WHY Fixed Excel rules break when behaviour shifts (new festival season, new product line). A model retrained on fresh data adapts.
WHEN Use ML when you have labelled history (supervised), unlabelled structure to discover (unsupervised), or an environment to learn from trial and error (reinforcement) — not when a simple SUMIF answers the question.
| Approach | Example | ML? |
|---|---|---|
| Rule | "Flag churn if support_tickets > 5" | No — fixed threshold |
| Dashboard | Monthly churn rate chart | No — describes past |
| Supervised ML | Learn weights from tenure, spend, tickets → predict churn | Yes |
| Unsupervised ML | Group customers by behaviour without a churn label | Yes |
This course assumes you completed Statistics for AI & ML — means, distributions, correlation, hypothesis tests, and bias-variance. Those ideas explain why splits, metrics, and model choice matter.
Three types of machine learning
1 — Supervised learning
You have features (inputs) and a label (target) for each historical row.
| Task | Target type | First example in this course |
|---|---|---|
| Regression | Number (₹ revenue, delivery minutes) | Linear regression |
| Classification | Category (churn yes/no, fraud yes/no) | Logistic regression |
WHY Most business ML starts here — you already logged outcomes and want to predict the next one.
WHEN Churn, credit risk, demand forecast, fraud detection.
# Supervised pattern (conceptual — full code in later lessons)
# X = features, y = known labels from history
# model.fit(X_train, y_train) → learn from labelled past
# model.predict(X_new) → guess labels for new rows2 — Unsupervised learning
You have features only — no label column. The algorithm finds structure: clusters, segments, anomalies.
| Task | Goal | Where in this course |
|---|---|---|
| Clustering | Group similar customers | K-means clustering |
| Dimensionality reduction | Compress many columns | Mentioned in Relationships (PCA link) |
WHY Marketing and product teams need segments before they have a "churn" flag for every user.
WHEN RFM segments, anomaly detection, exploratory grouping.
3 — Reinforcement learning (RL)
An agent takes actions in an environment, receives rewards or penalties, and learns a policy (what to do in each state) to maximise long-term reward.
| Piece | Example |
|---|---|
| Agent | Game-playing program, ad-bidding bot |
| Action | Raise bid, show variant B, move robot arm |
| Reward | +1 win, +₹ margin, −1 crash |
WHY RL fits sequential decisions — chess, robotics, some recommendation systems — not static spreadsheet rows.
WHEN The problem is "what action next?" over time, not "predict this column from these features."
Reinforcement learning ≠ deep learning
This distinction trips up many learners:
| Reinforcement learning | Deep learning | |
|---|---|---|
| What it is | A learning paradigm — learn from reward feedback | A model family — neural networks with many layers |
| Question it answers | What action maximises future reward? | What complex function maps inputs → outputs? |
| Needs labels? | Needs rewards, not class labels | Usually needs labelled examples (supervised) |
| Course location | Introduced here; not built in this track | Deep Learning course (after ML) |
Key point: You can do supervised learning with deep learning (image classifier). You can do reinforcement learning with deep learning (AlphaGo-style agents). But RL is not synonymous with deep learning — linear models, trees, and small networks can all be used inside RL or DL setups.
WHY Stakeholders say "we need AI/RL" when they mean "predict churn from a CSV" — that's supervised ML, not RL.
WHEN Clarify the problem type before picking tools.
How this course is sequenced
You will build skills in this order:
- What is ML (this lesson) — types and vocabulary
- Linear regression — first supervised example (predict a number)
- Feature engineering — variance, scaling, transforms for skewed data
- Scikit-learn implementation —
train_test_split,StandardScaler,Pipeline - ML workflow & leakage — honest evaluation habits
- More models — logistic regression, KNN, trees, forests, SVM, metrics, tuning, clustering, capstone
Probability for experiments (permutations, combinations, binomial simulation) lives in Applied ML statistics — part of the statistics prerequisite, not repeated here.
Essential vocabulary
| Term | Meaning |
|---|---|
| Feature | Input column the model sees |
| Label / target | Output the model learns to predict (supervised) |
| Training set | Historical rows used to fit parameters |
| Test set | Held-out rows for honest evaluation |
| Overfitting | Model memorises training noise — see stat4 |
Practice
Do this now: For each scenario, name the learning type (supervised regression, supervised classification, unsupervised, or reinforcement) and one sentence why:
- Predict next-month revenue from ad spend using three years of data
- Group 50,000 shoppers into segments with no churn label
- Train a warehouse robot to pick items faster over thousands of trials
- Flag likely loan defaults from applicant history
Checklist
- [ ] I can define ML as learning patterns from data, not fixed rules only
- [ ] I can name supervised, unsupervised, and reinforcement learning
- [ ] I can explain that RL is a paradigm, not the same as deep learning
- [ ] I know regression is the first supervised example in this course
- [ ] Next: Linear regression