Regression Vs Classification

Example of regression:

Predicting the weight of a giraffe based on its height

Predict the runs a cricketer will score in a particular match.

Predicting the monthly sales of a cloth store in rupees.

Predicting the confirmation probability (in fraction) of your train ticket whose current status is waiting list based on historical data

Examples of classification:

Predicting the outcome of an election

Predicting the emotion conveyed by a sentence

Predict which team will win a tournament.

Predict whether it will rain today.

Predict your mood tomorrow.

Neither classification nor regression:

Identifying abnormal data points is often categorized as an anomaly detection task rather than a traditional classification task.

  1. Nature of the Task:

    • Classification: In traditional classification tasks, you typically have labeled data with specific classes or categories. For example, predicting the outcome of an election involves classifying an outcome into predefined categories (e.g., candidate A wins, candidate B wins).

    • Anomaly Detection: This focuses on identifying data points that significantly differ from the majority of the data, which may not have clear labels. The task is more about flagging data that does not conform to expected patterns rather than assigning it to predefined categories.

  2. Labelling:

    • In classification, each instance in the dataset has a corresponding label indicating its class.

    • In anomaly detection, the majority of the dataset is typically "normal" data, while the anomalies are often rare and may not have specific labels. You may not have a clear idea of all possible anomalies beforehand.

  3. Output:

    • Classification typically outputs a class label for each input instance.

    • Anomaly detection may output a binary decision (anomaly vs. normal) or assign a score indicating how likely a point is to be an anomaly, rather than categorizing it into classes.

0
Subscribe to my newsletter

Read articles from Kaustubh Kulkarni directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Kaustubh Kulkarni
Kaustubh Kulkarni