Browse Source

优化数据处理代码

罗俊辉 1 năm trước cách đây
mục cha
commit
43cc5ba146
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      main_spider.py

+ 1 - 1
main_spider.py

@@ -156,7 +156,7 @@ class LightGBM(object):
         fw = open("result/summary_{}.txt".format(dt), "a+", encoding="utf-8")
         path = 'data/predict_data/predict_{}.json'.format(dt)
         x, y = self.read_data(path, yc=6)
-        true_label_df = DataFrame(y, columns=['ture_label'])
+        true_label_df = DataFrame(list(y), columns=['ture_label'])
         bst = lgb.Booster(model_file=self.model)
         y_pred = bst.predict(x, num_iteration=bst.best_iteration)
         pred_label_df = DataFrame(list(y_pred), columns=['pred_label'])