Regression takes input data x to find the response, y classification takes input data x and finds which group, a class does it belong to, y.
Back to the example of weather to predict possibilities. The possibilities(%) lies between 0 - 100%, which means it is a continuous output, thus, regression. But, can I use classification for this data? Yes!
Then, the question is, how do I label every data? If I am crazy enough, I can label 0%, 1%, 2% until 100%. That will give me 101 labels and surely classifying them will be hard. Plus, I have to consider if they fall in between such as 55%. So, classification is usable, but not practical.
Again, looking at the next example. Predict if today will rain or not? Or “raining? Yes or no?”. The goal is to predict two classes. and these classes can be labelled as:
From the example above, a model that requires too much (infinite) number of classes would work better with regression. And whenever, I need to build a model that group the data, classification is the way to go.