The difference between regression and classification models lies in the type of output they predict. Lang
Regression
-
Goal: Predict a continuous numeric value
-
Example Outputs: Price, temperature, age, salary
-
Algorithms Used:
-
Linear Regression
-
Decision Tree Regression
-
Random Forest Regressor
-
XGBoost Regressor
-
Example Question:
What will be the house price given the size and location?
Classification
-
Goal: Predict a category or class label
-
Example Outputs: Yes/No, Spam/Not Spam, Disease/No Disease
-
Algorithms Used:
-
Logistic Regression
-
Decision Trees
-
Random Forest Classifier
-
SVM
-
XGBoost Classifier
-
Example Question:
Will this email be classified as spam or not?
Summary Table
Feature | Regression | Classification |
Output Type | Continuous value | Categorical label |
Example Output | 250.5, 75 kg, 98.7% | Yes/No, Red/Blue, Class A/B |
Example Algorithm | Linear Regression, SVR | Logistic Regression, SVM |