-
Notifications
You must be signed in to change notification settings - Fork 1
/
globalTrainDataDirectory.py
47 lines (31 loc) · 1.24 KB
/
globalTrainDataDirectory.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from util import *
trainGlobal_filename = 'pickle/train/uid/'
trainGlobal_user = load_pickle(trainGlobal_filename+'userid.pickle')
trainGlobal_ratings = load_pickle(trainGlobal_filename+'rating.pickle')
trainGlobal_business = load_pickle(trainGlobal_filename+'business.pickle')
trainGlobal_docs_csr = load_pickle(trainGlobal_filename+'docs_csr.pickle')
trainGlobal_unique_users = set(trainGlobal_user)
trainGlobal_unique_business = set(trainGlobal_business)
trainGlobal_docs_nmf = load_pickle(trainGlobal_filename+'docs_nmf.pickle')
def getTrainGlobalAllUsers():
return trainGlobal_user
def getTrainGlobalAllBusiness():
return trainGlobal_business
def getTrainGlobalAllActualRating():
return trainGlobal_ratings
def getTrainGlobalAllDocCSR():
return trainGlobal_docs_csr
def getTrainGlobalAllDocNMF():
return trainGlobal_docs_nmf
def getTrainGlobalUser(i):
return trainGlobal_user[i]
def getTrainGlobalBusiness(i):
return trainGlobal_business[i]
def getTrainGlobalActualRating(i):
return trainGlobal_ratings[i]
def getTrainGlobalDocCSR(i):
return trainGlobal_docs_csr[i]
def getTrainGlobalUniqueUsers():
return trainGlobal_unique_users
def getTrainGlobalUniqueBusiness():
return trainGlobal_unique_business