在人工智能和机器学习方面,监督学习和无监督学习的区别是什么? 你能举个例子简单地解释一下吗?


当前回答

已经有很多答案可以详细解释这些差异。我在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.

例如,训练神经网络通常是监督学习:你告诉网络你输入的特征向量对应于哪个类。

聚类是无监督学习:你让算法决定如何将样本分组到具有共同属性的类中。

另一个无监督学习的例子是Kohonen的自组织地图。

我可以给你们举个例子。

假设您需要识别哪些车辆是汽车,哪些是摩托车。

在监督学习的情况下,你的输入(训练)数据集需要被标记,也就是说,对于你的输入(训练)数据集中的每个输入元素,你应该指定它是代表一辆汽车还是一辆摩托车。

在无监督学习的情况下,你不标记输入。无监督模型将输入聚类到基于相似特征/属性的聚类中。所以,在这种情况下,没有像“car”这样的标签。

监督学习基本上是一种技术,其中机器学习的训练数据已经被标记,假设是一个简单的偶数分类器,在训练过程中你已经对数据进行了分类。因此它使用“LABELLED”数据。

相反,无监督学习是一种机器自己标记数据的技术。或者你可以说这是机器从头开始自己学习的情况。

监督式学习

监督学习是基于对数据样本的训练 来自已分配正确分类的数据源。 这种技术用于前馈或多层 感知器(MLP)模型。这些MLP有三个特点 特点:

一层或多层不属于输入的隐藏神经元 或者网络的输出层,使网络能够学习和 解决任何复杂的问题 神经元活动所反映的非线性为 可微的, 网络的互联模型表现出高度的互联性 连通性。

These characteristics along with learning through training solve difficult and diverse problems. Learning through training in a supervised ANN model also called as error backpropagation algorithm. The error correction-learning algorithm trains the network based on the input-output samples and finds error signal, which is the difference of the output calculated and the desired output and adjusts the synaptic weights of the neurons that is proportional to the product of the error signal and the input instance of the synaptic weight. Based on this principle, error back propagation learning occurs in two passes:

传球前进:

这里,输入向量被呈现给网络。这个输入信号向前传播,一个神经元一个神经元地通过网络,并出现在输出端 网络作为输出信号:y(n) = φ(v(n)),其中v(n)是神经元的诱导局部场,定义为v(n) =Σ w(n)y(n)。在输出层o(n)计算的输出与期望的响应d(n)进行比较,并找到该神经元的误差e(n)。在这一过程中,神经网络的突触权重保持不变。

向后传递:

产生于该层输出神经元的错误信号通过网络向后传播。这将计算每个层中每个神经元的局部梯度,并允许网络的突触权值按照delta规则发生变化,如下:

Δw(n) = η * δ(n) * y(n).

这种递归计算继续进行,对每个输入模式进行向前传递和向后传递,直到网络收敛。

人工神经网络的监督学习模式是有效的,可以解决分类、植物控制、预测、预测、机器人等线性和非线性问题。

无监督学习

Self-Organizing neural networks learn using unsupervised learning algorithm to identify hidden patterns in unlabelled input data. This unsupervised refers to the ability to learn and organize information without providing an error signal to evaluate the potential solution. The lack of direction for the learning algorithm in unsupervised learning can sometime be advantageous, since it lets the algorithm to look back for patterns that have not been previously considered. The main characteristics of Self-Organizing Maps (SOM) are:

它将任意维度的输入信号模式转换为 一维或二维映射,并自适应地执行这种转换 该网络表示具有单一的前馈结构 计算层由一排排排列的神经元组成 列。在表示的每个阶段,每个输入信号都被保留 在适当的情况下, 处理紧密相关信息的神经元是紧密的 它们一起通过突触连接进行交流。

计算层也被称为竞争层,因为该层中的神经元相互竞争变得活跃。因此,这种学习算法被称为竞争算法。SOM中的无监督算法 工作分为三个阶段:

竞争阶段:

对于呈现给网络的每一个输入模式x,计算与突触权值w的内积,竞争层神经元找到一个诱发神经元竞争的判别函数,在欧氏距离上与输入权值向量接近的突触权值向量被宣布为竞争获胜者。这个神经元被称为最佳匹配神经元,

i.e. x = arg min ║x - w║.

合作的阶段:

获胜的神经元决定了合作神经元的拓扑邻域h的中心。这是通过横向相互作用d之间 合作的神经元。这种拓扑邻域在一段时间内减小了它的大小。

适应阶段:

使获胜的神经元及其邻近神经元根据输入模式增加其判别函数的个体值 通过适当的突触权重调整,

 Δw = ηh(x)(x –w).

在训练模式重复呈现后,由于邻域更新,神经网络的权重向量倾向于跟随输入模式的分布,因此神经网络在没有监督的情况下进行学习。

自组织模型自然地代表了神经生物学行为,因此被用于许多现实世界的应用,如聚类,语音识别,纹理分割,矢量编码等。

参考。