如何在weka的前缀中施加句法约束

问题描述:

有一种方法可以在weka算法先验中插入句法约束?

there is a way to insert syntactic constraints in weka algorithm priori?

例如,我只感兴趣具有特定项目的规则x)的规则,或者在前提中出现特定项目 I(y)的规则,或上述约束的组合。

For example, I be interested only in rules that have a specific item I(x) appearing in the consequent, or rules that have a specific item I(y) appearing in the antecedent, or combinations of the above constraints.

您可以使用特定项目I(您的记法中的I(x)结果。为此,您需要将相应的列I设置为类变量,即将其设置为最后一列(使用Weka API)。然后在Apriori参数中设置car为True(见下图),并且可能不要忘记降低minMetric,以便你有非零数量的规则

You can mine rules with a specific item "I" (what I(x) means in your notation?) appearing in the consequent. For this you need to set the corresponding column "I" as "class variable", that is to make it the last column (with Weka API). Then set "car" to True in the "Apriori" parameters (see the picture below) and, possibly, don't forget to lower the "minMetric" so that you have nonzero number of rules