回归与分类

为了学习深度学习最近在学习python当然也在学习各种网上的numpy、pandas、torch...云里雾里的坚持吧!!

在学线性模型、逻辑回归发现有的模型可以做回归有的模型可以做分类,但是这个回归和分类到底是怎么界定的其实我不太清楚。

为了更好的学习网上找了很多解释好多都是复制粘贴的基本上是“连续的是回归问题,离散的是分类问题”这个版本没什么具体的原因。

在众多的粘贴中我也发现这个吴恩达的机器学习里面的介绍,感觉这个还是不错的我也粘贴过来给大家看看。

Andrew Ng的Machine Learning课程给出的定义:


Supervised learning problems are categorized into "regression" and "classification" problems. 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.


Example:

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://www.zhihu.com/question/21329754

课程地址:https://www.coursera.org/learn/machine-learning/supplement/X64SM/introduction

posted @ 2022-04-16 20:33  Wy3年半  阅读(44)  评论(0)    收藏  举报