有人能解释一下数据挖掘中分类和聚类的区别吗?

如果可以,请给出两者的例子以理解主旨。


当前回答

首先,像这里的许多回答一样:分类是有监督的学习,聚类是无监督的。这意味着:

Classification needs labeled data so the classifiers can be trained on this data, and after that start classifying new unseen data based on what he knows. Unsupervised learning like clustering does not uses labeled data, and what it actually does is to discover intrinsic structures in the data like groups. Another difference between both techniques (related to the previous one), is the fact that classification is a form of discrete regression problem where the output is a categorical dependent variable. Whereas clustering's output yields a set of subsets called groups. The way to evaluate these two models is also different for the same reason: in classification you often have to check for the precision and recall, things like overfitting and underfitting, etc. Those things will tell you how good is the model. But in clustering you usually need the vision of and expert to interpret what you find, because you don't know what type of structure you have (type of group or cluster). That's why clustering belongs to exploratory data analysis. Finally, i would say that applications are the main difference between both. Classification as the word says, is used to discriminate instances that belong to a class or another, for example a man or a woman, a cat or a dog, etc. Clustering is often used in the diagnosis of medical illness, discovery of patterns, etc.

其他回答

我认为分类是将数据集中的记录分类为预定义的类,甚至是在运行中定义类。我认为这是任何有价值的数据挖掘的先决条件,我喜欢把它看作无监督学习,即在挖掘数据和分类作为一个很好的起点时,一个人不知道他/她在寻找什么

另一端的聚类属于监督学习,即一个人知道要寻找什么参数,它们之间的相关性以及关键水平。我认为这需要对统计学和数学有所了解

摘自《驯象人在行动》一书,我认为它很好地解释了两者的区别:

分类算法与聚类算法(如k-means算法)相关,但仍有很大不同。 分类算法是监督学习的一种形式,与无监督学习相反,无监督学习发生在聚类算法中。 监督学习算法是一种给出包含目标变量期望值的例子。无监督算法不会得到想要的答案,而是必须自己找到一些合理的答案。

+分类: 给你一些新的数据,你必须为它们设置新的标签。

例如,一家公司希望对其潜在客户进行分类。当一个新客户来的时候,他们必须确定这个客户是否会购买他们的产品。

+集群: 你得到了一组历史交易记录,记录了谁买了什么。

通过使用聚类技术,您可以区分客户的细分。

分类一行:

将数据分类为预定义的类别

用于集群的一行代码:

将数据分组到一组类别中

关键的区别:

分类是获取数据并将其放入预定义的类别中,而在聚类中,您想将数据分组到的类别集是事先不知道的。

结论:

Classification assigns the category to 1 new item, based on already labeled items while Clustering takes a bunch of unlabeled items and divide them into the categories In Classification, the categories\groups to be divided are known beforehand while in Clustering, the categories\groups to be divided are unknown beforehand In Classification, there are 2 phases – Training phase and then the test phase while in Clustering, there is only 1 phase – dividing of training data in clusters Classification is Supervised Learning while Clustering is Unsupervised Learning

我写了一篇关于同一主题的长文章,你可以在这里找到:

https://neelbhatt40.wordpress.com/2017/11/21/classification-and-clustering-machine-learning-interview-questions-answers-part-i/

聚类是一种对对象进行分组的方法,通过这种方式,具有相似特征的对象聚集在一起,而具有不同特征的对象分开。它是机器学习和数据挖掘中常用的统计数据分析技术。

分类是在训练数据集的基础上识别、区分和理解对象的分类过程。分类是一种有监督的学习技术,其中训练集和正确定义的观察是可用的。