fp-growth and performance
gold
New Altair Community Member
hello
how can use performance criteria after f p-growth and association rules to earn accuracy , recall and other criteria?
how can use performance criteria after f p-growth and association rules to earn accuracy , recall and other criteria?
Tagged:
0
Best Answers
-
Hi @gold!
Association analysis is very different from classification. The performance measures you named only apply to classification, they don't make sense in an association context.
Look at the tutorial process of FP-Growth, available from the help. With Create Association Rules after FP-Growth you do get the specific measures (Lift, Support, Confidence, ...) that apply to association rule mining.
There is also Apply Association Rules. It is possible to build a more complex process that applies a set of association rules to new item sets.
You should be able to use this to predict additions to shopping baskets or other item sets and then check if the predictions were correct. You need to transform the data for this into a tabular shape suited for classification (one item set per row). There you would have an attribute with the role prediction (coming from Apply Association Rules) and one with label (the actual addition). This structure is suitable for Performance (Classification) or Performance (Binominal Classification) depending on how you select the prediction and label attributes. (They could be the actual item, or just true/false for one particular item.)
Regards,
Balázs0 -
Hi!
You would probably use Pivot with the transaction/basket ID to group the items, and probably Select Attributes and Generate Attributes to create the attributes you're interested in. This can be one particular item, or the one coming from the Apply Association Rules, depending on your requirements.
For example, the questions could be:
- Was Item X predicted correctly? If the association rules said that it will be added, was it added?
- If Item Y was actually in the basket, was it predicted by the association rules?
etc.
You're right with Set Roles. You can always use that to set the appropriate roles on your attributes.
Regards,
Balázs1
Answers
-
Hi @gold!
Association analysis is very different from classification. The performance measures you named only apply to classification, they don't make sense in an association context.
Look at the tutorial process of FP-Growth, available from the help. With Create Association Rules after FP-Growth you do get the specific measures (Lift, Support, Confidence, ...) that apply to association rule mining.
There is also Apply Association Rules. It is possible to build a more complex process that applies a set of association rules to new item sets.
You should be able to use this to predict additions to shopping baskets or other item sets and then check if the predictions were correct. You need to transform the data for this into a tabular shape suited for classification (one item set per row). There you would have an attribute with the role prediction (coming from Apply Association Rules) and one with label (the actual addition). This structure is suitable for Performance (Classification) or Performance (Binominal Classification) depending on how you select the prediction and label attributes. (They could be the actual item, or just true/false for one particular item.)
Regards,
Balázs0 -
Hi BalazsBarany
thank you for your guidance
how can transform the data for this into a tabular shape suited for classification (one item set per row).
and how can have an attribute with the role prediction (coming from Apply Association Rules) and one with label (the actual addition). it mean I must use set role after association rules? is it possible?
0 -
Hi BalazsBarany
thank you for your guidance
how can transform the data for this into a tabular shape suited for classification (one item set per row).
and how can have an attribute with the role prediction (coming from Apply Association Rules) and one with label (the actual addition). it mean I must use set role after association rules? is it possible?
0 -
Hi!
You would probably use Pivot with the transaction/basket ID to group the items, and probably Select Attributes and Generate Attributes to create the attributes you're interested in. This can be one particular item, or the one coming from the Apply Association Rules, depending on your requirements.
For example, the questions could be:
- Was Item X predicted correctly? If the association rules said that it will be added, was it added?
- If Item Y was actually in the basket, was it predicted by the association rules?
etc.
You're right with Set Roles. You can always use that to set the appropriate roles on your attributes.
Regards,
Balázs1 -
Hi BalazsBarany
thank you for your guidance
how can transform the data for this into a tabular shape suited for classification (one item set per row).
and how can have an attribute with the role prediction (coming from Apply Association Rules) and one with label (the actual addition). it mean I must use set role after association rules? is it possible?
0 -
Thanks a lot BalazsBarany
but my dataset is different with other dataset, I use Movielens 100k dataset, so I cant use pivot , because of kind of dataset.
I sent my project for you.
Thanks in advance for your help
0 -
Hi @gold,
I downloaded the data and executed your process. It seems to work but you have small errors in Generate Attributes, for example children with less than 10 years are also considered teenagers.
Now the problem you're trying to solve would be interesting.
For example, you would split up the data into a training set and a test set and apply the learned rules on the test set. You would then check the conclusions in the attributes you're interested in (e. g. good rating). You would then compare the predicted and the actual result.
However, it's much easier to apply straight classification on this data than association analysis if "good rating" is your target attribute.
Regards,
Balázs0