@@ -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数据集