Question

I need to create association rules using apriori algorithm in Rapidminer, but I can't seem to make it work. I'm using the 5.3.1 weka extension.

I've already created the association rules using built-in FP-Growth and Create Associations operators, and it worked as expected. This is how the process looks like:

FP-Growth

Because all my attributes are already of binomial type I could use the FP-Growth directly. But if i use the same approach for apriori (confidence=0.1, support=0.1):

enter image description here

As a result I'm not getting what I was looking for:

Minimum support: 0.1 (26 instances)
Minimum metric <confidence>: 0.1
Number of cycles performed: 18

(...)

Best rules found:
  1. A=FALSE 53 ==> E=FALSE 26    conf:(0.49)
  2. H=FALSE 74 ==> E=FALSE 30    conf:(0.41)
  3. E=FALSE 75 ==> H=FALSE 30    conf:(0.4)
  4. C=FALSE 68 ==> E=FALSE 27    conf:(0.4)
  5. D=FALSE 67 ==> H=FALSE 26    conf:(0.39)
  6. E=FALSE 75 ==> C=FALSE 27    conf:(0.36)
  7. H=FALSE 74 ==> D=FALSE 26    conf:(0.35)
  8. E=FALSE 75 ==> A=FALSE 26    conf:(0.35)
Was it helpful?

Solution

When you try to run the algorithm w - apriori in RapidMiner, your data set on which you are making the process must not contain numeric attributes.

A solution would be as follows:

  • Add this operator to your process. After you load the data:

    Data Transformation > Type Conversion > Numerical to Polynomial

  • On the operator, select

    attribute type filter = single
    
    name of your attribute
    

Here's a pictorial example of what I mean:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top