有人能解释一下数据挖掘中分类和聚类的区别吗?
如果可以,请给出两者的例子以理解主旨。
有人能解释一下数据挖掘中分类和聚类的区别吗?
如果可以,请给出两者的例子以理解主旨。
当前回答
分类:在离散输出中预测结果=>映射输入变量到离散类别
常用用例:
电子邮件分类:垃圾邮件或非垃圾邮件 制裁贷款给客户:是的,如果他有能力支付制裁贷款金额的EMI。不行就不行 癌症肿瘤细胞鉴定:是关键还是非关键? 推文的情感分析:推文是积极的、消极的还是中性的 新闻分类:将新闻分类为预定义的类-政治,体育,健康等
聚类:是对一组对象进行分组,使同一组(称为聚类)中的对象彼此之间(在某种意义上)比其他组(聚类)中的对象更相似。
常用用例:
营销:发现客户细分市场的营销目的 生物学:植物和动物的不同种类的分类 图书馆:根据主题和信息对不同的书籍进行聚类 保险:了解客户、他们的政策并识别欺诈行为 城市规划:将房屋分组,并根据其地理位置和其他因素研究其价值。 地震研究:确定危险区 推荐系统:
引用:
Geeksforgeeks
数据有志者
3叶节点
其他回答
机器学习或AI在很大程度上是通过它执行/完成的任务来感知的。
在我看来,通过在任务的概念上思考聚类和分类,可以真正帮助理解两者之间的区别。
聚类是对事物进行分组,分类是给事物贴上标签。
让我们假设你在一个派对大厅里,所有的男人都穿着西装,女人都穿着长袍。
现在,你问你的朋友几个问题:
你好,你能帮我分组吗?
你的朋友可能给出的答案有:
1:他可以根据性别分组,男性或女性
2:他可以根据人的衣服来分组,一个穿西装,一个穿长袍
他可以根据头发的颜色把人分类
他可以把人按年龄分组,等等。
你的朋友有很多方法可以完成这个任务。
当然,你可以通过提供额外的信息来影响他的决策过程,比如:
你能帮我把这些人按性别(或年龄,或头发颜色或衣服等)分组吗?
Q2:
在第二季度之前,你需要做一些准备工作。
你必须教导或通知你的朋友,这样他才能做出明智的决定。假设你对你的朋友说:
留长头发的人是女人。 留短发的人是男人。
Q2。现在,你指着一个长头发的人问你的朋友:这是一个男人还是一个女人?
你能想到的唯一答案是:女人。
当然,聚会上也可以有长发的男人和短发的女人。但是,根据你提供给你朋友的知识,答案是正确的。你可以通过教你的朋友如何区分这两者来进一步改进这个过程。
在上面的例子中,
Q1表示集群完成的任务。
在聚类中,你向算法(你的朋友)提供数据(人),并要求它对数据进行分组。
现在,由算法来决定什么是分组的最佳方式?(性别、肤色或年龄组别)。
同样,你可以通过提供额外的输入来影响算法的决策。
Q2表示分类完成的任务。
在那里,你给你的算法(你的朋友)一些数据(人),称为训练数据,并让他学习哪些数据对应哪个标签(男性或女性)。然后,您将算法指向某些数据,称为测试数据,并要求它确定它是男性还是女性。你的教学越好,预测就越准。
在Q2或Classification中的Pre-work只是训练你的模型,这样它就可以学习如何区分。在聚类或Q1中,这个前期工作是分组的一部分。
希望这能帮助到一些人。
谢谢
通常,在分类中,您有一组预定义的类,并希望知道新对象属于哪个类。
聚类尝试将一组对象分组,并发现对象之间是否存在某种关系。
在机器学习的背景下,分类是监督学习,聚类是无监督学习。
也可以看看维基百科上的分类和聚类。
分类一行:
将数据分类为预定义的类别
用于集群的一行代码:
将数据分组到一组类别中
关键的区别:
分类是获取数据并将其放入预定义的类别中,而在聚类中,您想将数据分组到的类别集是事先不知道的。
结论:
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/
首先,像这里的许多回答一样:分类是有监督的学习,聚类是无监督的。这意味着:
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.