model_feas = df_trn.columns[5:]
df_ins = lgb.Dataset(data=df_trn[df_trn['smpl_mrk']==ins_size_sign][model_feas].copy(),
label=df_trn[df_trn['smpl_mrk']==ins_size_sign][tgt].values,
feature_name=model_feas)
上面报错,
把feature_name改为list类型之后不报错了:
model_feas = list(df_trn.columns[5:])