浏览代码

awg 更新lgb_train

anweiguo 1 月之前
父节点
当前提交
c9e97b670f
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      models_processing/model_train/model_training_lightgbm.py

+ 1 - 0
models_processing/model_train/model_training_lightgbm.py

@@ -21,6 +21,7 @@ def build_model(df,args):
         df = df[df['is_limit']==False]
     # 清洗特征平均缺失率大于20%的天
     df = missing_features(df, features, col_time)
+    df = df[~np.isnan(df[label])]
     # 拆分数据为训练集和测试集
     X_train, X_test, y_train, y_test = train_test_split(df[features], df[label], test_size=0.2, random_state=42)
     # 创建LightGBM数据集