diff --git a/code/parse_copenhagen.py b/code/parse_copenhagen.py index 9146dca..d57ebbd 100644 --- a/code/parse_copenhagen.py +++ b/code/parse_copenhagen.py @@ -16,6 +16,64 @@ import matplotlib.pyplot as plt import time import zipfile +''' +usr n +109 6549 +112 3277 +113 4202 +139 8681 +14 9378 +145 4192 +147 4428 +157 11503 +164 8045 +17 4238 +176 19732 +178 7738 +186 3289 +190 13843 +216 6126 +236 3810 +244 10563 +262 17567 +264 9792 +274 11572 +275 4316 +287 13394 +299 7373 +304 6502 +317 3892 +324 11349 +344 14479 +374 5512 +383 18751 +389 3438 +396 7004 +453 3957 +474 7692 +480 4009 +504 2622 +505 11200 +561 4304 +570 2136 +576 6553 +58 12755 +593 3429 +595 4982 +619 6189 +633 5229 +657 10941 +658 1658 +663 11461 +688 19794 +691 6755 +705 5 +76 4875 +77 25 +79 8892 +81 8944 +88 17254 +''' # https://cloud.delkappa.com/s/ACMsDr2jnW3b6Np # Copenhagen data format @@ -111,6 +169,12 @@ def main(args): break # Save to results lmdk_lib.save_data(args, np.array(usrs_expt, str), 'usrs_expt') + # Get all users + # usrs = np.unique(usrs_expt[:, 0]) + # for usr in usrs: + # usr_cont = cont_data[(cont_data[:, uid_a] == float(usr)) | (cont_data[:, uid_b] == float(usr))] + # print(int(usr), len(usr_cont)) + # exit() ''' Get contacts for user 14 9378 contacts @@ -126,8 +190,6 @@ def main(args): usr_cont_cur = np.copy(usr_cont) # Remove goal landmarks from contacts for c in cont: - # print(usr_cont) - # exit() usr_cont_cur = usr_cont_cur[(usr_cont_cur[:, uid_a] != c) & (usr_cont_cur[:, uid_b] != c)] # Check print(g, (len(usr_cont) - len(usr_cont_cur))/len(usr_cont))