我如何可视化聚类算法中的错误并在python中创建报告?

问题描述 投票:0回答:1

我将我的数据分为3个类。因此,每个集群都有一组购买相似商品的相似用户。每个群集都有一个模式。现在,并不是每个用户都完全遵循此模式,因为模型中存在一些不能100%准确的错误。

我必须在python中创建一个报告,其中包含每个用户的信息,例如

- userid
- How many items correctly matched the cluster pattern
- How many items did not match the cluster pattern due to error. 

我已经用下面的伪代码遵循了基本方法:

foreach cluster
  get cluster pattern
  foreach user under this cluster
     compare if the itemid of user and itemid in the cluster are same
     save such items in a list
     or
     save in another list  

现在,由于这是一个巨大的结果,因此我需要在python中创建结果pdf并将其存储。我怎样才能做到这一点?是否有简单且替代的方法来执行此操作?

python matplotlib report cluster-analysis unsupervised-learning
1个回答
0
投票

sklearn模块中有混淆矩阵,实际上我不知道可以从中获得任何报告,但是可以将其可视化。 Here是与此主题相关的话题,here是官方文档,希望对您有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.