Skip to content

Commit

Permalink
Merge pull request #413 from Tarun-Sreepada/main
Browse files Browse the repository at this point in the history
bug fix for pollution
  • Loading branch information
udayRage authored May 13, 2024
2 parents ba28c78 + f65219c commit 033c472
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion PAMI/frequentPattern/basic/Apriori.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def save(self, outFile: str) -> None:
with open(outFile, 'w') as f:
for x, y in self._finalPatterns.items():
x = self._sep.join(x)
f.write(f"{x} : {y}\n")
f.write(f"{x}:{y}\n")

def getPatterns(self) -> Dict[str, int]:
"""
Expand Down
8 changes: 4 additions & 4 deletions PAMI/frequentPattern/basic/Aprioribitset.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
from deprecated import deprecated


class AprioriBitset(_ab._frequentPatterns):
class Aprioribitset(_ab._frequentPatterns):
"""
:Description: AprioriBitset is one of the fundamental algorithm to discover frequent patterns in a transactional database.
Expand Down Expand Up @@ -368,7 +368,7 @@ def save(self, outFile: str) -> None:
with open(outFile, 'w') as f:
for x, y in self._finalPatterns.items():
x = self._sep.join(x)
f.write(f"{x} : {y}\n")
f.write(f"{x}:{y}\n")

def getPatterns(self):
"""
Expand All @@ -392,9 +392,9 @@ def printResults(self):
_ap = str()
if len(_ab._sys.argv) == 4 or len(_ab._sys.argv) == 5:
if len(_ab._sys.argv) == 5:
_ap = AprioriBitset(_ab._sys.argv[1], _ab._sys.argv[3], _ab._sys.argv[4])
_ap = Aprioribitset(_ab._sys.argv[1], _ab._sys.argv[3], _ab._sys.argv[4])
if len(_ab._sys.argv) == 4:
_ap = AprioriBitset(_ab._sys.argv[1], _ab._sys.argv[3])
_ap = Aprioribitset(_ab._sys.argv[1], _ab._sys.argv[3])
_ap.startMine()
_ap.mine()
print("Total number of Frequent Patterns:", len(_ap.getPatterns()))
Expand Down
2 changes: 1 addition & 1 deletion PAMI/frequentPattern/basic/FPGrowth.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def save(self, outFile: str) -> None:
with open(outFile, 'w') as f:
for x, y in self._finalPatterns.items():
x = self._sep.join(x)
f.write(f"{x} : {y}\n")
f.write(f"{x}:{y}\n")

def getPatterns(self) -> Dict[str, int]:
"""
Expand Down

0 comments on commit 033c472

Please sign in to comment.