|
@@ -154,7 +154,6 @@ 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)
|
|
|
- Y_test = [0 if i < 6 else 1 for i in y]
|
|
|
bst = lgb.Booster(model_file=self.model)
|
|
|
y_pred = bst.predict(x, num_iteration=bst.best_iteration)
|
|
|
temp = sorted(list(y_pred))
|
|
@@ -163,7 +162,7 @@ class LightGBM(object):
|
|
|
# 转换为二进制输出
|
|
|
score_list = []
|
|
|
for index, item in enumerate(list(y_pred)):
|
|
|
- real_label = Y_test[index]
|
|
|
+ real_label = y[index]
|
|
|
score = item
|
|
|
prid_label = y_pred_binary[index]
|
|
|
print(real_label, "\t", prid_label, "\t", score)
|