Difference between Regression and classification i

2020-03-26 11:34发布

I am new to Machine Learning. Can anyone tell me the major difference between classification and regression in machine learning?

3条回答
ゆ 、 Hurt°
2楼-- · 2020-03-26 11:58

Regression - the output variable takes continuous values.

Example :Given a picture of a person, we have to predict their age on the basis of the given picture

Classification - the output variable takes class labels.

Example: Given a patient with a tumor, we have to predict whether the tumor is malignant or benign.

查看更多
Emotional °昔
3楼-- · 2020-03-26 12:00

Regression aims to predict a continuous output value. For example, say that you are trying to predict the revenue of a certain brand as a function of many input parameters. A regression model would literally be a function which can output potentially any revenue number based on certain inputs. It could even output revenue numbers which never appeared anywhere in your training set.

Classification aims to predict which class (a discrete integer or categorical label) the input corresponds to. e.g. let us say that you had divided the sales into Low and High sales, and you were trying to build a model which could predict Low or High sales (binary/two-class classication). The inputs might even be the same as before, but the output would be different. In the case of classification, your model would output either "Low" or "High," and in theory every input would generate only one of these two responses.

(This answer is true for any machine learning method; my personal experience has been with random forests and decision trees).

查看更多
The star\"
4楼-- · 2020-03-26 12:22

I am a beginner in Machine Learning field but as far as i know, regression is for "continuous values" and classification is for "discrete values". With regression, there is a line for your continuous value and you can see that your model is good or bad fit. On the other hand, you can see how discrete values gains some meaning "discretely" with classification. If i am wrong please feel free to make correction.

查看更多
登录 后发表回答