Commit b05a8671 authored by 段英荣's avatar 段英荣

调试

parent be3f5f2b
......@@ -22,9 +22,9 @@ import time
class LinUCB:
d = 2
alpha = 2
r1 = 0.1
r0 = -0.1
alpha = 0.25
r1 = 1
r0 = -1
default_tag_list = list()
zhengxing_host = "172.16.30.141"
......@@ -43,12 +43,12 @@ class LinUCB:
:return:
"""
try:
Aa_list = list()
AaI_list = list()
theta_list = list()
for tag_id in tag_list:
tag_dict = pickle.loads(redis_linucb_tag_data_dict[tag_id])
Aa_list.append(tag_dict["Aa"])
AaI_list.append(tag_dict["AaI"])
theta_list.append(tag_dict["theta"])
xaT = np.array([user_features_list])
......@@ -57,7 +57,7 @@ class LinUCB:
art_max = -1
old_pa = 0
AaI_tmp = np.array(Aa_list)
AaI_tmp = np.array(AaI_list)
theta_tmp = np.array(theta_list)
begin1 = time.time()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment