microsoft/FLAML
在 GitHub 查看Flaml/LightGBM - Shouldn't I found better/faster or equal results from FLAML than direct LightGBM?
Open
#785 创建于 2022年10月31日
good first issuequestion
仓库指标
- Star
- (4,364 star)
- PR 合并指标
- (PR 指标待抓取)
描述
Hello
I have the following training with LightGBM
model2 = lgb.LGBMRegressor(learning_rate=0.09,max_depth=-5,random_state=42, n_estimators=20000) #, use_missing=FALSE)
model2.fit(x_train,y_train,eval_set=[(x_test,y_test),(x_train,y_train)], verbose=20,eval_metric='logloss') #, init_model=filename2_)
When I look at results it reutrn this
print('Training accuracy {:.4f}'.format(model2.score(x_train,y_train)))
print('Testing accuracy {:.4f}'.format(model2.score(x_test,y_test)))
lgb.plot_importance(model2)
lgb.plot_metric(model2)
Training accuracy 1.0000
Testing accuracy 0.7628
I'm trying with FLAML (please keep in mind I'm new with Python and those libraries) I would expect the results to get better quicker?
from flaml import AutoML
automl = AutoML()
automl.fit(X_train=x_train, y_train=y_train, time_budget=60*60*7, estimator_list=['lgbm'], task='regression')#, estimator_list=['lgbm'], task='regression') #'regression classification
[1.76959344 0.11876356 1.6142814 ... 1.79535421 0.55507853 1.04489782]
LGBMRegressor(colsample_bytree=0.7114672034208275,
learning_rate=0.013851620085123617, max_bin=1023,
min_child_samples=9, n_estimators=1877, num_leaves=262,
reg_alpha=0.009443894441159862, reg_lambda=1.8437202926962308,
verbose=-1)
Training accuracy 0.9081
Testing accuracy 0.0693
TY!