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

leverage bug fix #406

Merged
merged 2 commits into from
May 2, 2024
Merged
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
4 changes: 2 additions & 2 deletions PAMI/AssociationRules/basic/leverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _readPatterns(self):
raise ValueError("Pattern should be a tuple. PAMI is going through a major revision. Please raise an issue in the github repository regarding this error and provide information regarding input and algorithm.\
In the meanwhile try saving the patterns to a file using (alg).save() and use the file as input. If that doesn't work, please raise an issue in the github repository.")
s = tuple(sorted(pattern[i]))
self._frequentPatterns[s] = support[i]
self._frequentPatterns[s] = support[i] / self._maxTS
if isinstance(self._iFile, str):
if _ab._validators.url(self._iFile):
f = _ab._urlopen(self._iFile)
Expand All @@ -194,7 +194,7 @@ def _readPatterns(self):
s = line[0].split(self._sep)
s = tuple(sorted(s))

self._frequentPatterns[s] = int(line[1])
self._frequentPatterns[s] = int(line[1]) / self._maxTS
else:
try:
with open(self._iFile, 'r', encoding='utf-8') as f:
Expand Down