3
$\begingroup$

I understand classification....a discrete response or category, like animal is dog or cat.

The author says..."Regression techniques predict continuous changes such as the change in temperature, power demand, or stock market prices."

I can't wrap my head around what he means.

Thanks.

$\endgroup$
4
$\begingroup$

For the sake of illustration, let's imagine that you're trying to predict the amount of gas in the tank of your car.

A classification problem statement of this question would be whether you have gas in your car (yes or no).

A regression statement of this problem would predict the level of gas in your car (anywhere between completely full or completely empty) and could take any value.

The output of a classification model can be one of n options, where n is the number of classes (and/or the probability associated with each class).

The output of a regression model is a (possibly bounded) continuous value.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Data science noob here. Would you say Gaussian Naive Bayes is a classification model or regression? The gas tank comment you made seems to be a distribution, not really a set of discrete numbers. $\endgroup$ – Jaguar Aug 3 '19 at 4:00
  • $\begingroup$ Gaussian Naive Bayes is a classification algorithm. The answer given by the gas tank classifier would answer "do I have gas in my car?" The answer given by the gas tank repressor would answer "how much gas do I have in my car?" $\endgroup$ – Thomas Cleberg Aug 5 '19 at 11:10
3
$\begingroup$

Understanding the difference with an example will be very easy.

Classification:- When you are asked to predict whether a patient will survive or no from a disease X given all the necessary data of the patients who survived or died due to the same disease X in the past and also given data for predicting the same on the current dataset.

Regression:- When you are asked to find the selling price of a car given the required information of the cars that were sold in the past with their prices and similar features for the test set (cars).

In other words, we can also say that if we want to find out a discrete answer then it will be a Classification problem and if we want to find out continuous (range-based) predictions then it will be a Regression problem

| improve this answer | |
$\endgroup$
2
$\begingroup$

Regression and classification are both related to prediction, where regression predicts a value from a continuous set, whereas classification predicts the 'belonging' to the class.

both are the example of supervised learning.

eg : price of a house depending on the 'size' (sq. feet or whatever unit) and say 'location' of the house, can be some 'numerical value' (which can be continuous) : this relates to regression.

Similarly the prediction of price can be in words, viz., 'very costly', 'costly', 'affordable', 'cheap', and 'very cheap' : this relates to classification.

Each class may correspond to some range of values

| improve this answer | |
$\endgroup$
0
$\begingroup$

Classification task:

Predict (guess, estimate) a class (a nominal variable) based on some predictor variables, which can be of any type. Example: Based on the videos a user has watched over a video streaming platform, predict whether this user is a male or female.

Regression task:

Predict (guess, estimate) a continuous value (a numerical variable) based on some predictor variables, which can be of any type. Example: Based on the videos a user has watched over a video streaming platform, predict the user's age.

Now, there is a gray area: There are algorithms which predict probability, which is a continuous value, between 0 and 1. By the above definition, you can consider them regression algorithms (think of logistic regression). At the same time, this probability refers to classes, so they can be used for classification (just set a threshold for probability: everything with probability < 0.5 goes into one class, and with > 0.5 into the other). How you "classify" these algorithms is a philosophical question, of little practical importance.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.