Skip to content

Module 2: Logistic Regression (The Decision Boundary)

📚 Module 2: Logistic Regression

Course ID: ML-302
Subject: The Decision Boundary

Don’t let the name confuse you. Logistic Regression is actually used for Classification (choosing between categories). It’s how the AI decides if an email is Spam (Yes) or Not Spam (No).


🚦 Step 1: The Choice (The “Decision Boundary”)

Imagine you are a doctor and you want to predict if a tumor is Dangerous (1) or Safe (0) based on its Size.

📉 The Analogy: The S-Shaped Curve

To keep our numbers between 0 and 1 (probabilities), we take our straight line and squash it into an S-Curve called the Sigmoid Function.


⚖️ Step 2: Binary Classification

  • 0 = Negative class (Not Spam).
  • 1 = Positive class (Spam).

🥅 Module 2 Review

  1. Goal: Decide between two categories (0 or 1).
  2. Sigmoid: The tool that turns a line into a 0 to 1 probability.
  3. Confidence: The “predict_proba” result that tells you how sure the model is.

:::tip Slow Learner Note Logistic Regression is the foundation of almost all classification in AI. If you understand this, you understand how Gmail filters your spam! :::