Types of Logistic Regression
Types of Logistic Regression
Logistic Regression can be categorized based on the type and number of output classes in the problem.
1. Binary Logistic Regression
๐น Definition:
Used when the dependent variable has only two possible outcomes.
๐น Output:
- 0 or 1
- Yes / No
- True / False
๐น Examples:
- Email classification → Spam / Not Spam
- Disease detection → Positive / Negative
- Loan approval → Approved / Rejected
๐น How it works:
- Predicts the probability of one class
- Uses a threshold (usually 0.5) to decide the final class
2. Multinomial Logistic Regression
๐น Definition:
Used when there are three or more categories, and no natural order between them.
๐น Output:
- One class out of many (mutually exclusive)
๐น Examples:
- Food preference → Veg / Non-Veg / Vegan
- Handwritten digit recognition → 0–9
- Type of animal → Dog / Cat / Bird
๐น How it works:
- Extends binary logistic regression
-
Uses techniques like:
- Softmax function
- One-vs-Rest (OvR) classification
3. Ordinal Logistic Regression
๐น Definition:
Used when there are multiple categories with a meaningful order or ranking.
๐น Output:
- Ordered categories
๐น Examples:
- Movie ratings → 1 to 5 stars
- Customer satisfaction → Low / Medium / High
- Education level → School / College / Graduate
๐น How it works:
- Considers the order between categories
- Predicts probabilities while maintaining ranking relationships
๐ Quick Comparison
| Type | Number of Classes | Order Matters? | Example |
|---|---|---|---|
| Binary | 2 | ❌ No | Spam / Not Spam |
| Multinomial | 3+ | ❌ No | Food preference |
| Ordinal | 3+ | ✅ Yes | Ratings (1–5) |
๐ก Key Insight
Choosing the right type depends on:
- Number of categories
- Whether those categories have a natural order
Comments
Post a Comment