Commit 9a5f543f authored by 段英荣's avatar 段英荣

调试

parent 699d6624
...@@ -151,7 +151,8 @@ class Generate_Feature_Info(object): ...@@ -151,7 +151,8 @@ class Generate_Feature_Info(object):
user_tag_label = -1 user_tag_label = -1
if len(user_portrait_dict)>0: if len(user_portrait_dict)>0:
sorted_user_portrait_list = sorted(user_portrait_dict["projects"].items(), key=lambda x: x[1], reverse=True) sorted_user_portrait_list = sorted(user_portrait_dict["projects"].items(), key=lambda x: x[1], reverse=True)
user_tag_label = label_encoder.transform(sorted_user_portrait_list[0][0])[0] user_max_score_tag = sorted_user_portrait_list[0][0].encode("utf-8")
user_tag_label = label_encoder.transform([user_max_score_tag])[0]
user_feature_list = [user_tag_label] user_feature_list = [user_tag_label]
redis_client.hset(redis_name_user_linucb_feature,device_id,json.dumps(user_feature_list)) redis_client.hset(redis_name_user_linucb_feature,device_id,json.dumps(user_feature_list))
......
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