Assignment 2 - Regression vs Classification
1. Regression
Regression is a supervised learning technique used to predict a continuous outcome variable based
on one or more predictor variables.
In regression, the model learns a mapping from the input data (features) to a continuous value. The
goal is to minimize the error between the predicted values
and the actual values. Common algorithms for regression include Linear Regression, Polynomial
Regression, and Decision Trees.
For example, predicting the price of a house based on features like its size, location, and age is a
regression task.
Justification:
- The outcome variable is continuous.
- Regression assumes a functional relationship between variables.
- It minimizes error metrics like Mean Squared Error (MSE) or Mean Absolute Error (MAE).
2. Classification
Classification is also a supervised learning technique, but it is used to predict a discrete label or
category. The model learns to
map input features to a specific class label. Unlike regression, the output is categorical, and the
focus is on assigning the correct class label rather
than predicting a numerical value. Popular algorithms for classification include Logistic Regression,
Support Vector Machines, and Random Forests.
For example, identifying whether an email is spam or not based on its content is a classification
task.
Justification:
- The outcome variable is categorical.
- Classification models predict discrete class labels.
- Metrics like accuracy, precision, and recall are used to evaluate classification models.