Skip to content

Commit

Permalink
Update convertMultiTSIntoFuzzy.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Likhitha-palla authored Dec 19, 2023
1 parent 12409ec commit 09c6f2e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions PAMI/extras/convertMultiTSIntoFuzzy.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def _fuzzyMembershipFunc(self) -> None:
with open(self._FuzFile, 'r', encoding='utf-8') as f:
count = 0
for line in f:
line = line.strip()
line = line.split("\n")[0]
parts = line.split(" ")
lowerBound = parts[0].strip()
Expand All @@ -100,6 +101,7 @@ def _creatingItemSets(self) -> None:
try:
with open(self._iFile, 'r', encoding='utf-8') as f:
for line in f:
line = line.strip()
line = line.split("\n")[0]
parts = line.split(":")
parts[0] = parts[0].strip()
Expand All @@ -108,9 +110,9 @@ def _creatingItemSets(self) -> None:
times = parts[0].split('\t')
items = parts[1].split('\t')
quantities = parts[2].split('\t')
self._timeEvents.append([x for x in times])
self._transactionsDB.append([x for x in items])
self._fuzzyValuesDB.append([x for x in quantities])
self._timeEvents.append([x for x in times if x])
self._transactionsDB.append([x for x in items if x])
self._fuzzyValuesDB.append([x for x in quantities if x])
except IOError:
print("File Not Found")
quit()
Expand Down

0 comments on commit 09c6f2e

Please sign in to comment.