回归与分类

分类(regression)和回归(classification)区别

    两者在于输出变量的类型

       分类和回归均是监督学习问题,区别在于学习函数的预测输出是类别还是值。

       回归问题的要求是:给定一个新的模式,根据训练集推断它所对应的输出y(实数)是多少。也就是使用y=g(x)来推断任一输入x所对应的输出值。比较常见的回归算法是线性回归算法(LR),回归分析用在神经网络上,其最上层是不需要加上softmax函数的,而是直接对前一层累加即可。回归是对真实值的预测。

       分类问题是:给定一个新的模式,根据训练集推断它所对应的类别(如:+1,-1)。也就是使用y=sign(g(x))来推断任一输入x所对应的类别。例如判断图片上的动物是一只猫还是一只狗,分类通常是建立在回归之上,分类的最后一层通常要使用softmax函数进行判断其所属类别,分类必须确定所属类别。最常见的分类方法是逻辑回归,或者叫逻辑分类。

       分类的目标是离散的,回归的目标是连续的。

    定义 (Andrew Ng)

        In a regression problem, we are trying to predict results within a continuous output, meaning that we are trying to map input variables to some continuous function. In a classification problem, we are instead trying to predict results in adiscrete output. In other words, we are trying to map input variables into discrete categories.

       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.

        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.

 



 

        

        

转载于:https://my.oschina.net/u/2272631/blog/782227

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值