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

Merge branch 'similar_sort' into 'master'

modify linucb

See merge request !141
parents 92a1f999 2489e092
...@@ -103,6 +103,7 @@ class CollectData(object): ...@@ -103,6 +103,7 @@ class CollectData(object):
reward = 1 if is_click or is_vote else 0 reward = 1 if is_click or is_vote else 0
logging.info("positive tag_list,device_id:%s,tag_list:%s" % (str(device_id), str(tag_list)))
for tag_id in tag_list: for tag_id in tag_list:
self.update_user_linucb_tag_info(reward,device_id,tag_id,user_feature) self.update_user_linucb_tag_info(reward,device_id,tag_id,user_feature)
...@@ -125,6 +126,7 @@ class CollectData(object): ...@@ -125,6 +126,7 @@ class CollectData(object):
reward = 1 if is_click or is_vote else 0 reward = 1 if is_click or is_vote else 0
logging.info("negative tag_list,device_id:%s,tag_list:%s" % (str(device_id),str(tag_list)))
for tag_id in tag_list: for tag_id in tag_list:
self.update_user_linucb_tag_info(reward,device_id,tag_id,user_feature) self.update_user_linucb_tag_info(reward,device_id,tag_id,user_feature)
......
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