Classification and regression tasks popular explanation

We can divide tasks into regression tasks and classification tasks according to the types of tasks. What is the difference between the two? According to more official statements, the prediction problem in which both input variables and output variables are continuous variables is a regression problem. The prediction problem where the output variable is a finite number of discrete variables becomes a classification problem.

Regression task: continuous, the output is a fixed value
Classification task: discontinuous, the output is a probability vector

Regression: In layman's terms, the result we want to predict is a number. For example, to predict a person's weight through a person's diet, there can be infinitely many weight values, some people are 50kg, some people are 51kg, between 50 and There are also infinitely many numbers between 51. This kind of prediction result is a certain number, and which number has infinite possibilities. We will train a model and get this certain number after passing in the parameters. We call this type of problem a regression problem. The predicted variable (weight) is continuous on the number axis because there are infinite possibilities, so we call this variable a continuous variable.

Classification: We want to predict whether a person is healthy or unhealthy, predict whether he will get cancer or not, predict whether he is Aquarius, Scorpio or Sagittarius. This result only has a few or more values. We can put Each value is regarded as a category, which category the predicted object belongs to. Such a problem is called a classification problem. If there are only two results of a classification problem, such as "yes" and "no", we put the result as The sample data of "yes" is called "positive example", and the sample data of "no" is called "negative example". Correspondingly, the variable of this result is called discrete variable.

Guess you like

Origin blog.csdn.net/DENGSHUCHAO152/article/details/122288984