Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 81d6719

Browse files
Refactor Apriori algorithm with support, confidence, lift as methods and ruff fixes
1 parent f2b1f8a commit 81d6719

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎machine_learning/apriori_algorithm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- Frequent itemsets
66
- Association rules with minimum confidence and lift
77
8-
WIKI:https://en.wikipedia.org/wiki/Apriori_algorithm
8+
WIKI:https://en.wikipedia.org/wiki/Apriori_algorithm
99
"""
1010

1111
from collections import defaultdict
@@ -116,3 +116,5 @@ def generate_association_rules(self):
116116
for rule in model.rules:
117117
antecedent, consequent, conf, lift = rule
118118
print(f"{set(antecedent)} -> {set(consequent)}, conf={conf:.2f}, lift={lift:.2f}")
119+
120+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /