Ver código fonte

mvp: 分数规则调整

Signed-off-by: binren <zhangbr@elab-plus.com>
binren 5 anos atrás
pai
commit
4332c7df70
1 arquivos alterados com 9 adições e 4 exclusões
  1. 9 4
      mvp.py

+ 9 - 4
mvp.py

@@ -661,19 +661,22 @@ class Mvp:
             if table in ('用户画像-行业', '用户画像-生活方式', '用户画像-消费结构', '用户画像-社交模式'):
                 score = score * random.uniform(0.8, 1.0)
             if table in ('用户画像-审美偏好', '用户画像-消费观念'):
-                if table == '用户画像-消费观念' and tag_name not in ('高端奢侈', '国潮国货', '小众品牌',
+                if table == '用户画像-消费观念':
+                    if tag_name in ('高端奢侈', '国潮国货', '小众品牌',
                                                              '亲民平价', '私人定制', '抽象艺术', '街头艺术',
                                                              '非遗艺术', '古典艺术', '颜控', '养成类',
                                                              '实力派','黑科技', '实用科技'):
-                    pass
+                        score = random.uniform(0, 0.5)
+                    else:
+                        pass
                 else:
                     score = random.uniform(0, 0.5)
         if age == '95后' and city == '上海市':
             if table in ('用户画像-社交模式'):
                 score = random.uniform(0.8, 1.0) * score
             if table in ('用户画像-行业', '用户画像-审美偏好', '用户画像-消费观念', '用户画像-生活方式', '用户画像-消费结构'):
-                if table in ('用户画像-审美偏好', '用户画像-消费观念'):
-                    if table == '用户画像-消费观念' and tag_name in ('高端奢侈', '国潮国货', '小众品牌',
+                if table in ('用户画像-消费观念'):
+                    if tag_name in ('高端奢侈', '国潮国货', '小众品牌',
                                                                  '亲民平价', '私人定制', '抽象艺术', '街头艺术',
                                                                  '非遗艺术', '古典艺术', '颜控', '养成类',
                                                                  '实力派', '黑科技', '实用科技'):
@@ -681,6 +684,8 @@ class Mvp:
                         score = random.uniform(0, 0.5)
                     else:
                         pass
+                else:
+                    score = random.uniform(0, 0.5)
             if table == '用户画像-出行方式':
                 # 使用模拟数据
                 people_score = self.out_way_datas.get(age + city + crowd + tag_name)