Rana Maninder Singh
Lesson 1 of 7ML Fundamentals

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

ResourceLink
Previouseˣ, log & loss
NextML workflow end to end
PrerequisitesStatistics 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
Data science roadmap
Data science roadmap

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.

ApproachExampleML?
Rule"Flag churn if support_tickets > 5"No — fixed threshold
DashboardMonthly churn rate chartNo — describes past
Supervised MLLearn weights from tenure, spend, tickets → predict churnYes
Unsupervised MLGroup customers by behaviour without a churn labelYes

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.

TaskTarget typeFirst example in this course
RegressionNumber (₹ revenue, delivery minutes)Linear regression
ClassificationCategory (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 rows

2 — Unsupervised learning

You have features only — no label column. The algorithm finds structure: clusters, segments, anomalies.

TaskGoalWhere in this course
ClusteringGroup similar customersK-means clustering
Dimensionality reductionCompress many columnsMentioned 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.

PieceExample
AgentGame-playing program, ad-bidding bot
ActionRaise 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 learningDeep learning
What it isA learning paradigm — learn from reward feedbackA model family — neural networks with many layers
Question it answersWhat action maximises future reward?What complex function maps inputs → outputs?
Needs labels?Needs rewards, not class labelsUsually needs labelled examples (supervised)
Course locationIntroduced here; not built in this trackDeep 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:

  1. What is ML (this lesson) — types and vocabulary
  2. Linear regression — first supervised example (predict a number)
  3. Feature engineering — variance, scaling, transforms for skewed data
  4. Scikit-learn implementation — train_test_split, StandardScaler, Pipeline
  5. ML workflow & leakage — honest evaluation habits
  6. 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

TermMeaning
FeatureInput column the model sees
Label / targetOutput the model learns to predict (supervised)
Training setHistorical rows used to fit parameters
Test setHeld-out rows for honest evaluation
OverfittingModel 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:

  1. Predict next-month revenue from ad spend using three years of data
  2. Group 50,000 shoppers into segments with no churn label
  3. Train a warehouse robot to pick items faster over thousands of trials
  4. 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