Skip to content

Commit 190c6f6

Browse files
Update frequent_pattern_growth.py
Remove unused function argument
1 parent 0abeeab commit 190c6f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

machine_learning/frequent_pattern_growth.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,11 @@ def ascend_tree(leaf_node: TreeNode, prefix_path: list[str]) -> None:
240240
ascend_tree(leaf_node.parent, prefix_path)
241241

242242

243-
def find_prefix_path(base_pat: frozenset, tree_node: TreeNode | None) -> dict: # noqa: ARG001
243+
def find_prefix_path(tree_node: TreeNode | None) -> dict:
244244
"""
245245
Find the conditional pattern base for a given base pattern.
246246
247247
Args:
248-
base_pat: The base pattern for which to find the conditional pattern base.
249248
tree_node: The node in the FP-Tree.
250249
251250
Example:
@@ -317,7 +316,7 @@ def mine_tree(
317316
new_freq_set = pre_fix.copy()
318317
new_freq_set.add(base_pat)
319318
freq_item_list.append(new_freq_set)
320-
cond_patt_bases = find_prefix_path(base_pat, header_table[base_pat][1])
319+
cond_patt_bases = find_prefix_path(header_table[base_pat][1])
321320
my_cond_tree, my_head = create_tree(list(cond_patt_bases), min_sup)
322321
if my_head is not None:
323322
# Pass header_table[base_pat][1] as node_to_test to update_header

0 commit comments

Comments
 (0)