Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudyyoung committed Apr 7, 2024
1 parent 3a6e8b6 commit 2343660
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions cskg/detectors/data_clumps.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from abc import ABC
from collections import defaultdict
import math
from time import sleep
from typing import Iterable
from neo4j.exceptions import ClientError
from loguru import logger
Expand All @@ -28,13 +26,13 @@ def detect(self):

# Create root node of FP Growth tree
self.clear_conditional_fp_nodes()
# self.clear_everything()
# self.create_index()
# self.create_fp_tree_root()
self.clear_everything()
self.create_index()
self.create_fp_tree_root()

# Build FP-growth tree
self.get_frequency_table()
# self.build_fp_growth_tree()
self.build_fp_growth_tree()
self.build_conditional_fp_tree()

def get_frequency_table(self):
Expand Down Expand Up @@ -111,7 +109,7 @@ def build_conditional_fp_tree(self):
RETURN node
"""
logger.debug(query)
results, meta = self.neo_db.cypher_query(query)
self.neo_db.cypher_query(query)

# Propagate correct support counts
query = f"""
Expand Down Expand Up @@ -276,9 +274,9 @@ def __init__(
self.node_id = f"{self.type}_{self.class_qualified_name}_{self.param_name}"


class Transaction(list[FpTreeNode]): ...


class ConditionalFpTreeNode(FpTreeNode):
type = "conditional_fp_tree_node"
label = "ConditionalFpTreeNode"


class Transaction(list[FpTreeNode]): ...

0 comments on commit 2343660

Please sign in to comment.