Comments (7)
I met the same issue now.
@ZaxR , @yanxiang007 Did you find any project can do this job??
Otherwise I want to fixed this bug.
from fp-growth.
Hey guys, I had fixed one of the problem in my own repo, now it can show the "7" itemset which @yanxiang007 mentioned , but it still exists some other bugs.
I am using orange3-associate as an alternate.
Hope this information can help you.
from fp-growth.
I'm experiencing a similar issue of missing patterns - so far, only for patterns of length 1. Too much data to post here, but the project can be found here. Here's the issue I came across, though:
I get valid patterns of:
('carrots', 'lettuce', 'garlic'): 10
('carrots', 'lettuce'): 10
('carrots', 'garlic'): 13
('lettuce', 'garlic'): 10
yet there are no single-item patterns for ('carrots',), ('lettuce',), or ('garlic'). Given that any sub-pattern should be at least as frequent as its parent, I would expect all three to show up and with higher counts.
Is there a way to correct this? Thank you for the package and support!
from fp-growth.
I ended up using Christian Borgelt's PyFIM; however, I still think this implementation is worth fixing/upgrading for a few reasons:
- The association rules option only produces association rules with a single consequent (what I personally needed, but not "complete").
- The implementation above is more intended as a command line program, and figuring out some of the parameter options in python (even with 'help') takes a bit of guesswork (particularly because its compiled from C++) .
- pip install is nice...
from fp-growth.
Guys,
Thanks for your engagement with this.
To be perfectly honest, I didn't know what I was doing when I put this project up here.
I need to clear a block of time to go through bug reports and pull requests and push tests, fixes and a new release to PyPI.
If anyone wants to help, shout!
from fp-growth.
from fp-growth.
Hi All,
In working on this issue for my own work I found a problem with the generate_association rules module specifically with the line below
if confidence >= confidence_threshold:
rules[antecedent] = (consequent, confidence)
This only allows effectively one rule per item and thus the higher order rules per item where they exist are essentially over riding the simple 1 -> 1 items.
I addressed this by changing the code so that instead of setting the dict value each time - if a rule already exists for an item I then append the new rule as a list to the dict value as follows
if confidence >= confidence_threshold:
rule1=(consequent, confidence)
rule1=list(rule1)
if antecedent in rules:
rules[antecedent].append(rule1)
else:
rules[antecedent]=rule1
The rules of course then have to be unravelled in a slightly more complex manner but this worked well .
First rule is value[0] -> value[1] . Subsequent rules are stored as list in value[n] so the unravelling is as follows where prel is the antecedent list ,postl is the consequent list and confl is the confidence list
for key,value in rules.iteritems():
if len(value)> 2: #If item has more than 1 rule
for i in range(2,len(value)):# For rule 2 and subsequent rules
prel.append(key)
postl.append(value[i][0])
confl.append(value[i][1])
prel.append(key)
postl.append(value[0])
confl.append(value[1])
hope this helps
from fp-growth.
Related Issues (17)
- the output of rule arrays can not find in patterns ,and so many of them turn to 1
- Rules Being Overwritten HOT 1
- missing itemsets & need to add Lift
- Avoid recursion when inserting
- Different rules on regenerating HOT 4
- the whole algorithm is totally a mistake! HOT 3
- Extracting antecedent and consequent
- can not output when applying to latitude
- Minimum support scale HOT 4
- MemoryError while running on transactions
- Missing patterns HOT 1
- How show support for each rules ?
- Got value confidence rule more than 1.0 HOT 11
- The count of root is missing HOT 2
- MemoryError while running on a 50 item transactions HOT 2
- the threshold in find_frequent_patterns is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fp-growth.