在xgboost里面讲过了就不仔细讲解了,链接如下:
https://blog.csdn.net/qq_35307209/article/details/89914785'metric': {'binary_logloss', 'l2', 'auc'},
train=lgb.Dataset(train_x,train_y, free_raw_data=False) eval = lgb.Dataset(valid_x, valid_y, free_raw_data=False)
model = lgb.train(params, # 参数字典
train, # 训练集
num_boost_round=200, # 迭代次数
valid_sets=[eval, train])