赞
踩
class lightgbm.Dataset(data, label=None, max_bin=None, reference=None, weight=None, group=None, init_score=None, silent=False, feature_name='auto', categorical_feature='auto', params=None, free_raw_data=True)
- trn_data = lgb.Dataset(X_tr, label=y_tr)
- val_data = lgb.Dataset(X_valid, label=y_valid)
class lightgbm.Booster(params=None, train_set=None, model_file=None, silent=False) #booster可用lgb来代替
只要有lgb实例,就可以调用下列函数 ,包括 predict,
lgb.add_valid 添加交叉训练集
lgb.attr(key) Get attribute string from the Booster.
lgb.current_iteration() Get the index of the current iteration.
lgb.dump_model(num_iteration=-1) Dump Booster to jso
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。