Skip to content

Commit 53f54d5

Browse files
updated plotFrequentPatternSetsGraph.py
1 parent 9f0bf33 commit 53f54d5

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

PAMI/extras/graph/plotFrequentPatternSetsGraph.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
along with this program. If not, see <https://www.gnu.org/licenses/>.
2828
"""
2929

30+
import sys
31+
3032
import matplotlib.pyplot as plt
3133
from typing import Dict, Union
3234

@@ -94,19 +96,7 @@ def getStatistics(self) -> None:
9496

9597

9698
if __name__ == "__main__":
97-
samplePatterns = {
98-
('A',): 110,
99-
('B',): 150,
100-
('C',): 120,
101-
('A', 'B'): 80,
102-
('A', 'C'): 70,
103-
('B', 'C'): 90,
104-
('A', 'B', 'C'): 50,
105-
('D',): 110,
106-
('A', 'D'): 60,
107-
('B', 'D'): 65,
108-
}
109-
110-
obj = plotFrequentPatternSetsGraph(samplePatterns)
99+
# Usage: python plotFrequentPatternSetsGraph.py patterns.txt
100+
obj = plotFrequentPatternSetsGraph(sys.argv[1])
111101
obj.plot()
112102
obj.getStatistics()

0 commit comments

Comments
 (0)