소스 검색

仅通过标题tag 分析全部数据

罗俊辉 1 년 전
부모
커밋
5a48d96e48
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      main.py

+ 3 - 3
main.py

@@ -140,9 +140,9 @@ class LightGBM(object):
         bst = lgb.Booster(model_file=self.model)
         y_pred = bst.predict(x, num_iteration=bst.best_iteration)
         pred_score_df = pd.DataFrame(list(y_pred), columns=['pred_score'])
-        # temp = sorted(list(y_pred))
-        # yuzhi = temp[int(len(temp) * 0.9) - 1]
-        y_pred_binary = [0 if i <= 0.169541 else 1 for i in list(y_pred)]
+        temp = sorted(list(y_pred))
+        yuzhi = temp[int(len(temp) * 0.75) - 1]
+        y_pred_binary = [0 if i <= yuzhi else 1 for i in list(y_pred)]
         pred_label_df = pd.DataFrame(list(y_pred_binary), columns=['pred_label'])
         score_list = []
         for index, item in enumerate(list(y_pred)):