在人工智能和机器学习方面,监督学习和无监督学习的区别是什么? 你能举个例子简单地解释一下吗?
当前回答
监督式机器学习 算法从训练数据集中学习的过程 预测产出。”
预测输出精度与训练数据(长度)成正比
监督学习是指你有输入变量(x)(训练数据集)和输出变量(Y)(测试数据集),你使用一种算法来学习从输入到输出的映射函数。
Y = f(X)
主要类型:
分类(离散y轴) 预测(连续y轴)
算法:
分类算法: 神经网络 Naïve贝叶斯分类器 费雪线性判别 然而, 决策树 超级向量机 预测算法: 最近的邻居 线性回归,多元回归
应用领域:
将电子邮件分类为垃圾邮件 患者是否有 疾病与否 语音识别 预测HR是否会选择特定的候选人 预测股票市场价格
其他回答
例如,训练神经网络通常是监督学习:你告诉网络你输入的特征向量对应于哪个类。
聚类是无监督学习:你让算法决定如何将样本分组到具有共同属性的类中。
另一个无监督学习的例子是Kohonen的自组织地图。
已经有很多答案可以详细解释这些差异。我在codeacademy上找到了这些动图,它们经常能帮助我有效地解释它们之间的差异。
监督式学习
请注意,训练图像在这里有标签,并且模型正在学习图像的名称。
无监督学习
注意,这里所做的只是分组(聚类),模型不知道任何图像。
我尽量简单点。
监督学习:在这种学习技术中,我们得到一个数据集,系统已经知道该数据集的正确输出。这里,我们的系统通过预测自己的值来学习。然后,它通过使用代价函数来检查其预测与实际输出的接近程度,从而进行准确性检查。
无监督学习:在这种方法中,我们很少或根本不知道我们的结果是什么。因此,我们从不知道变量影响的数据中推导出结构。 我们根据数据中变量之间的关系对数据进行聚类,从而形成结构。 在这里,我们没有基于预测的反馈。
既然你问了这个非常基本的问题,似乎有必要详细说明机器学习本身是什么。
Machine Learning is a class of algorithms which is data-driven, i.e. unlike "normal" algorithms it is the data that "tells" what the "good answer" is. Example: a hypothetical non-machine learning algorithm for face detection in images would try to define what a face is (round skin-like-colored disk, with dark area where you expect the eyes etc). A machine learning algorithm would not have such coded definition, but would "learn-by-examples": you'll show several images of faces and not-faces and a good algorithm will eventually learn and be able to predict whether or not an unseen image is a face.
这个特殊的人脸检测的例子是有监督的,这意味着你的例子必须被标记,或者明确地说哪些是人脸,哪些不是。
在无监督算法中,你的例子没有标记,也就是说你什么都不说。当然,在这种情况下,算法本身不能“发明”人脸是什么,但它可以尝试将数据聚类到不同的组中,例如,它可以区分人脸与风景非常不同,而风景与马非常不同。
Since another answer mentions it (though, in an incorrect way): there are "intermediate" forms of supervision, i.e. semi-supervised and active learning. Technically, these are supervised methods in which there is some "smart" way to avoid a large number of labeled examples. In active learning, the algorithm itself decides which thing you should label (e.g. it can be pretty sure about a landscape and a horse, but it might ask you to confirm if a gorilla is indeed the picture of a face). In semi-supervised learning, there are two different algorithms which start with the labeled examples, and then "tell" each other the way they think about some large number of unlabeled data. From this "discussion" they learn.
监督学习:你给出各种标记的示例数据作为输入,以及正确的答案。该算法将从中学习,并开始根据输入预测正确的结果。示例:电子邮件垃圾邮件过滤器
无监督学习:你只提供数据,不告诉任何东西——比如标签或正确答案。算法自动分析数据中的模式。例如:谷歌新闻
推荐文章
- 如何从scikit-learn决策树中提取决策规则?
- 数据挖掘中分类和聚类的区别?
- model.eval()在pytorch中做什么?
- 为什么binary_crossentropy和categorical_crossentropy对同一个问题给出不同的性能?
- 一般来说,应该选择哪种机器学习分类器?
- 是否可以使用scikit-learn K-Means聚类来指定自己的距离函数?
- 哪些是遗传算法/遗传规划解决方案的好例子?
- 如何在Python中进行热编码?
- 如何将数据分成3组(训练、验证和测试)?
- 历史库存数据的来源
- 如何在PyTorch中初始化权重?
- 关于如何将数据集划分为训练集和验证集,是否存在经验法则?
- 在scikit-learn中保存分类器到磁盘
- 如何解释机器学习模型的损失和准确性
- 线性回归和逻辑回归的区别是什么?