分类与回归的区别

分类和回归的区别在于输出变量的类型。

定性输出称为分类,或者说是离散变量预测。给定一个新的模式,根据训练集推断它所对应的类别(如:+1,-1),是一种定性输出,也叫离散变量预测。

定量输出称为回归,或者说是连续变量预测。给定一个新的模式,根据训练集推断它所对应的输出值(实数)是多少,是一种定量输出,也叫连续变量预测。

 

例子1:

  预测明天的气温是多少度,这是一个回归任务;预测明天是阴、晴还是雨,就是一个分类任务。

例子2:

  We could turn this example into a classification problem by instead making our output about whether the house "sells for more or less than the asking price." Here we are classifying the houses based on price into two discretecategories.

  Given data about the size of houses on the real estate market, try to predict their price. Price as a function of size is a continuous output, so this is a regression problem.

 

 

参考资料:http://www.zhihu.com/question/21329754/answer/18004852

posted @ 2019-05-23 19:25  Xiangdasha  阅读(1013)  评论(0)    收藏  举报