Skip to content

Commit

Permalink
merged keercomm
Browse files Browse the repository at this point in the history
  • Loading branch information
amjadnzr committed May 11, 2019
2 parents 9a34493 + adce5ed commit 9b5286c
Show file tree
Hide file tree
Showing 35 changed files with 12,527 additions and 12,510 deletions.
Binary file not shown.
Binary file not shown.
Binary file modified RecommenderAPI/Framework/__pycache__/Evaluator.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/Framework/__pycache__/EventData.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file modified RecommenderAPI/Framework/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/AutoRec.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/AutoRecAlgorithm.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/AutoRecBakeOff.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/BakeOff.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/BuildModels.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/CateRec.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/ContentKNNAlgorithm.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/ContentRecs.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/KNNBakeOff.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/MainAPI.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/RBM.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/RBMAlgorithm.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/RBMBakeOff.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/RecsBakeOff.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/SVDBakeOff.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/SimpleItemCF.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/SimpleUserCF.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/__pycache__/Util.cpython-37.pyc
Binary file not shown.
27 changes: 17 additions & 10 deletions RecommenderAPI/dataset/AddRating.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
import pandas as pd

def addRate(userId,eventId,rating):
# Creating the first Dataframe using dictionary
df1 = pd.read_csv('./dataset/rating.csv')
df3 = pd.read_csv('./dataset/rating-neuro.csv')
# Creating the first Dataframe using dictionary

print("Line 6 says",type(userId))
print("Line 7 says",type(eventId))
print("Line 8 says",type(rating))
if (isinstance(userId, str) or isinstance(eventId, str) or isinstance(rating, str)) and (userId !='' and eventId !='' and rating !=''):
df1 = pd.read_csv('./dataset/rating.csv')
df3 = pd.read_csv('./dataset/rating-neuro.csv')
# Creating the Second Dataframe using dictionary
df2 = pd.DataFrame({"user-id":[userId],
df2 = pd.DataFrame({"user-id":[userId],
"event-id":[eventId],
"rating":[rating]})

# for appending df2 at the end of df1
df = df1.append(df2, ignore_index = True)
dff = df3.append(df2, ignore_index = True)
df = df1.append(df2, ignore_index = True)
dff = df3.append(df2, ignore_index = True)
# print the merged dataframe
print(df)
#print(df)

# converting to a csv file with index = false
df.to_csv(r'./dataset/rating.csv', index = False)
dff.to_csv(r'./dataset/rating-neuro.csv', index = False)
print("done")
df.to_csv(r'./dataset/rating.csv', index = False)
dff.to_csv(r'./dataset/rating-neuro.csv', index = False)
print("done")
else:
print("Not Done")

def addManyRate(userIds,eventIds,ratings):
# converting the string recieved by the json to a list by splitting
Expand Down
Binary file modified RecommenderAPI/dataset/__pycache__/AddRating.cpython-37.pyc
Binary file not shown.
Binary file modified RecommenderAPI/dataset/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Loading

0 comments on commit 9b5286c

Please sign in to comment.