Wednesday, January 14, 2026

What is the difference between classification and regression ?

 

1. Classification

Definition: Classification is about predicting categorical labels (discrete classes).

  • Goal: Assign input data to one of several predefined categories.
  • Output: A class label (e.g., "Yes" or "No", "Dog" or "Cat").
  • Examples:
    • Email spam detection (Spam / Not Spam)
    • Disease diagnosis (Positive / Negative)
    • Image recognition (Cat / Dog / Bird)

2. Regression

Definition: Regression is about predicting continuous numeric values.

  • Goal: Estimate a real-valued output based on input features.
  • Output: A number (e.g., price, temperature, age).
  • Examples:
    • Predicting house prices
    • Forecasting stock prices
    • Estimating temperature for tomorrow

Key Differences

AspectClassificationRegression
Output TypeDiscrete (categories)Continuous (numeric)
ExamplesSpam detection, sentiment analysisPrice prediction, demand forecasting
Evaluation MetricsAccuracy, F1-score, ROC-AUCRMSE, MAE, R²

No comments:

Post a Comment

Experienced Oracle DBA questions - STAR format answers

  1. How do you design Oracle infrastructure for high availability and scale? Situation: Our organization needed a robust Oracle setup to s...