Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix for pollution #413

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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