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

调试

parent 064185e5
...@@ -21,7 +21,7 @@ import time ...@@ -21,7 +21,7 @@ import time
class LinUCB: class LinUCB:
d = 491 d = 2
alpha = 0.1 alpha = 0.1
r1 = 10 r1 = 10
r0 = -0.1 r0 = -0.1
...@@ -181,10 +181,10 @@ class LinUCB: ...@@ -181,10 +181,10 @@ class LinUCB:
r = cls.r0 r = cls.r0
if user_features_array: if user_features_array:
xaT = np.array(user_features_array) xa = np.array(user_features_array)
else: else:
xaT = np.array([user_features]) xa = np.array([user_features])
xa = np.transpose(xaT) xaT = np.transpose(xa)
ori_redis_tag_data = redis_cli.hget(redis_name_linucb_matrix, content_id) ori_redis_tag_data = redis_cli.hget(redis_name_linucb_matrix, content_id)
......
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