What is the difference between Regression and Classification?

Asked 2 months ago Updated 14 days ago 247 views

1 Answer


1

The difference between Regression and Classification comes down to what kind of output you want to predict.

Core Difference

  • Regression → predicts a continuous value (numbers)
  • Classification → predicts a category or class (labels)

Regression (Continuous Output)

Regression is used when the output is a number with a range.

Examples:

  • Predicting house price → ₹25,00,000
  • Predicting temperature → 32.5°C
  • Predicting salary → ₹8.7 LPA

Common Algorithms:

  • Linear Regression
  • Polynomial Regression

Classification (Categorical Output)

Classification is used when the output is a label or category.

Examples:

  • Email → Spam / Not Spam
  • Disease → Positive / Negative
  • Image → Cat / Dog

Common Algorithms:

  • Logistic Regression
  • Decision Trees
  • Random Forest

Key Differences Table

Feature Regression Classification
Output Type Continuous (numbers) Discrete (labels/classes)
Example Price prediction Spam detection
Goal Estimate value Assign category
Graph Line/curve Decision boundary

Simple Analogy

  • Regression = “Kitna?” (How much?)
  • Classification = “Kaunsa type?” (Which category?)

In One Line

Regression predicts numbers, while classification predicts categories.

Write Your Answer