罗俊辉 il y a 1 an
Parent
commit
6240140ae7
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      main.py

+ 4 - 4
main.py

@@ -149,10 +149,10 @@ class LightGBM(object):
         data_series = pd.Series(score_list)
         print("统计 score 信息")
         print(data_series.describe())
-        # y_pred_binary = np.where(y_pred > 0.5, 1, 0)
-        # # 评估模型
-        # accuracy = accuracy_score(Y_test, y_pred_binary)
-        # print(f'Accuracy: {accuracy}')
+        y_pred_binary = np.where(y_pred > 0.5, 1, 0)
+        # 评估模型
+        accuracy = accuracy_score(Y_test, y_pred_binary)
+        print(f'Accuracy: {accuracy}')
 
 
 if __name__ == '__main__':