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

调试

parent bff3ad9e
......@@ -156,8 +156,8 @@ class LinUCB:
for tag_id in tag_list:
init_dict = {
"Aa": np.identity(cls.d),
"theta": np.zeros((cls.d, 1)),
"ba": np.zeros((cls.d, 1)),
"theta": np.zeros((cls.d, 491)),
"ba": np.zeros((cls.d, 491)),
"AaI": np.identity(cls.d)
}
pickle_data = pickle.dumps(init_dict)
......@@ -195,7 +195,7 @@ class LinUCB:
ori_redis_tag_dict = pickle.loads(ori_redis_tag_data)
new_Aa_matrix = ori_redis_tag_dict["Aa"] + np.dot(xa, xaT)
new_AaI_matrix = np.linalg.solve(new_Aa_matrix, np.identity(cls.d))
new_ba_matrix = ori_redis_tag_dict["ba"] + r*xaT
new_ba_matrix = ori_redis_tag_dict["ba"] + r*xa
user_tag_dict = {
"Aa": new_Aa_matrix,
......
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