Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ce6979

Browse files
author
Eric Naeseth
committed
Don't just look at leaf nodes when coming up with prefix paths.
1 parent 1d79a21 commit 8ce6979

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fp_growth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def collect_path(node):
159159
path.reverse()
160160
return path
161161

162-
return (collect_path(node) for node in self.nodes(item) if node.leaf)
162+
return (collect_path(node) for node in self.nodes(item))
163163

164164
def _removed(self, node):
165165
"""Called when `node` is removed from the tree; performs cleanup."""

0 commit comments

Comments
 (0)