Skip to content

Commit

Permalink
Update data_clumps.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudyyoung committed Apr 7, 2024
1 parent 7d45222 commit 3a6e8b6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cskg/detectors/data_clumps.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ def build_conditional_fp_tree(self):
logger.debug(query)
self.neo_db.cypher_query(query)

if len(results) > 100:
sleep(5)

# Query for frequent itemsets
query = f"""
MATCH path = (root:{ConditionalFpTreeNode.label})-[:LINKS*]->(end:{ConditionalFpTreeNode.label})
Expand All @@ -147,7 +144,11 @@ def build_conditional_fp_tree(self):

if len(interim_nodes) > 1:
self.result_collection.insert_one(
{"itemset": itemset, "support_count": frequency}
{
"itemset": itemset,
"support_count": frequency,
"size": len(itemset),
}
)

# Clear CFP Tree
Expand Down

0 comments on commit 3a6e8b6

Please sign in to comment.