Commit 6cac87e0 authored by 段英荣's avatar 段英荣

modify

parent 83264ece
...@@ -14,9 +14,9 @@ from django.conf import settings ...@@ -14,9 +14,9 @@ from django.conf import settings
class LinUCB: class LinUCB:
d = 2 d = 2
alpha = 0.1 alpha = 0.25
r1 = 2 r1 = 6
r0 = -2 r0 = -0.5
default_tag_list = list() default_tag_list = list()
@classmethod @classmethod
......
...@@ -57,6 +57,7 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query ...@@ -57,6 +57,7 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
tag_recommend_redis_key = "physical:linucb:tag_recommend:device_id:" + str(device_id) tag_recommend_redis_key = "physical:linucb:tag_recommend:device_id:" + str(device_id)
recommend_tag_dict = dict() recommend_tag_dict = dict()
tag_recommend_val = redis_client.get(tag_recommend_redis_key) tag_recommend_val = redis_client.get(tag_recommend_redis_key)
if tag_recommend_val: if tag_recommend_val:
......
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