# [PYTHON] Difference between regression and classification

# Regression and classification

## Regression

Regression is used when predicting continuous data, such as stock price analysis.
Mainly when dealing with numbers.
For example, regression is to look at the tendency of the feature amount of the data (draw a line on the coordinates), give a concrete number (determine from the line), and make a prediction.

## Classify

Unlike regression, classification is aimed at dividing (labeling) into given classes rather than giving specific numbers.
For example, looking at the number of petals, it is called classification to divide into pre-given classes (here, pansies and dandelions), such as pansies when there are few petals and dandelions when there are many.

## Comparison

The idea is that regression often considers time series and the passage of time (not necessarily that), whereas classification does not consider the passage of time in the first place. I have an image like that.

Put simply,

Regression → Forecast
Classification → Labeling

I wonder if it feels like that.