소스 검색

怎么回事
Merge branch 'dev_awg' into dev_david

David 1 개월 전
부모
커밋
724bcb8543
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]
         df = df[df['is_limit']==False]
     # 清洗特征平均缺失率大于20%的天
     # 清洗特征平均缺失率大于20%的天
     df = missing_features(df, features, col_time)
     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)
     X_train, X_test, y_train, y_test = train_test_split(df[features], df[label], test_size=0.2, random_state=42)
     # 创建LightGBM数据集
     # 创建LightGBM数据集