简体   繁体   English

Apriori 中 R 中的未知项目 Label

[英]Unknown Item Label in R in Apriori

I am trying to filter rules which contain a certain category of item in the LHS, stored the items belonging to that category in the form of a vector and using this vector with subset to filter all the rules.我正在尝试过滤包含 LHS 中某个类别的项目的规则,以向量的形式存储属于该类别的项目,并使用该向量和子集来过滤所有规则。

The error I am getting is "table contains an unknown item label".我得到的错误是“表包含一个未知的项目标签”。

Here's a snapshot of the code below:这是下面代码的快照:

top500vec is the vector which contains all the items of the same category,interested at looking for rules with these items on the LHS side top500vec 是包含同一类别的所有项目的向量,有兴趣在 LHS 端寻找这些项目的规则

在此处输入图像描述

BY just looking at the error, it seems like top500vec contains item labels that are not defined in top500onlyrules .通过仅查看错误,似乎top500vec包含未在top500onlyrules中定义的项目标签。 Check itemLabels(top500onlyrules) and make sure that top500vec only contains values that are valid item labels.检查itemLabels(top500onlyrules)并确保top500vec仅包含有效项目标签的值。

You should always post questions with reproducible examples.您应该始终发布带有可重复示例的问题。 See: How to make a great R reproducible example请参阅: 如何制作出色的 R 可重现示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM