-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Do you agree the following comment from the blog?
The otherItemsFrequency can be obtained from fList for the rules with a single item in the precondition.
But it seems to me that your confidence implementation is not corrrect still.
In yours code:
double confidence = (double)occurrence / firstFrequencyItem;Let’s look at formula:
conf(X => Y)=support(X&Y)/support(X)
In code, occurence is value that’s coresponds to X&Y set, but firstFrequencyItem is value that corresponds to Y. So you calculatesupport(X&Y)/support(Y). As you can see it’s not a confidence for rule X=>Y.Implementation should look like
double confidence = (double)occurrence / otherItemsFrequency;But how this otherItemsFrequency can be found in mahout output files?
My prectice shows that such frequencies can be found in frequentpatterns output but not for all rules.