Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is more machine learning questions, but perhaps someone will be able to help. I would like to know what is the difference between regression and classification when we try to generate output for a training data set x?

share|cite|improve this question
up vote 52 down vote accepted

Regression: the output variable takes continuous values.

Classification: the output variable takes class labels.

share|cite|improve this answer
    
The output variable (I assume you mean response variable) can also be boolean with logistic regression right? – Justin Bozonier Jul 24 '13 at 2:06
    
Binary logistic regression also outputs a continuous variable. Specifically, the regression estimates the odds that a variable is in a given class as a function of the predictor variables. – James Thompson Jul 29 '13 at 16:45
    
Binary Logistic regression produces a continuous output but not to try to give a continuous output at the data (regression) but in order to classify them in two classes – K. Stasko Mar 8 '14 at 13:05
    
+1. Not so often that I see such a clear answer! It makes the question look so simple & easy. – 0xc0de Feb 21 at 6:53

Same as Tim said a different way. Regression involves estimating or predicting a response. Classification is identifying group membership.

share|cite|improve this answer
5  
signed up to up vote this response. i love the plain English description. – Julian Apr 26 '13 at 5:49
1  
@Michael, I think*"estimating or predicting a response"* can be elaborated upon..... – Pacerier May 3 '15 at 16:38
    
+1, again for simplifying and incorporating some cases that might be confusing with @Tim's logic. – 0xc0de Feb 21 at 6:55

f: x-> y

here,

if y is discrete/categorical variable, then classification problem

if y is real number/continuous, then regression problem.

share|cite|improve this answer
2  
This seems to simply reiterate answers from long ago. If you have something new to add, please clarify your answer. – robjohn Jul 27 '14 at 12:51
    
i think best answer is this one – MonsterMMORPG Oct 14 '15 at 11:09

Regression and classification can work on some common problems where the response variable is either continuous or ordinal(?).

But the result is what would make us to choose between the two. For example simple, hard classifiers simply tries to put the example in specific class(eg SVM).(for eg, whether the project is profitable or not , and doesn't account for how much). Where as regression can give exact figure of profit value as some continuous value.

however in case of classification we can consider probabilistic models (eg logistic regression) where each class or label has some probability which can be weighted by the cost associated with each label or class and thus give us with final value on basis of which we can decide to put it some label or not.(for eg label A has probability of 0.3 but the payoff is huge (1000) however label B has probability 0.7 but the payoff is very low 10.So for maximizing the profit we might label the example as label A instead of B.

Note: I am still not an expert, perhaps someone would rectify if I am wrong in some part.

share|cite|improve this answer

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.

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.

share|cite|improve this answer

http://www.differencebetween.com/difference-between-classification-and-vs-regression/

In brief: • Classification trees have dependent variables that are categorical and unordered. • Regression trees have dependent variables that are continuous values or ordered whole values.

share|cite|improve this answer

Regression: given a set of data,find the best relationship that represent the set of data. Classification: given a known relationship, identify the class that the data belongs to.

We can see that regression and classification starts from opposing ends: to find a pattern, or to find the pattern that it belong to.

share|cite|improve this answer

Regression means to predict the output value using training data. Classification means to group the output into a class. e.g. we use regression to predict the house price from training data and use classification to predict the type of tumor i.e. harmful or not harmful using training data.

share|cite|improve this answer
    
It's funny when you read this answer while referring to a machine learning course at Coursera ;) . – 0xc0de Feb 21 at 6:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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