Answers for "LightGBM"

1

LightGBM

model = lgb.LGBMClassifier(learning_rate=0.09,max_depth=-5,random_state=42)
model.fit(x_train,y_train,eval_set=[(x_test,y_test),(x_train,y_train)],
          verbose=20,eval_metric='logloss')
Posted by: Guest on October-09-2021
0

LightGBM

print(metrics.classification_report(y_test,model.predict(x_test)))
Posted by: Guest on October-09-2021
0

LightGBM

print('Training accuracy {:.4f}'.format(model.score(x_train,y_train)))
print('Testing accuracy {:.4f}'.format(model.score(x_test,y_test)))
Posted by: Guest on October-09-2021
0

LightGBM

lgb.plot_tree(model,figsize=(30,40))
Posted by: Guest on October-09-2021
0

LightGBM

lgb.plot_importance(model)
Posted by: Guest on October-09-2021
0

LightGBM

metrics.plot_confusion_matrix(model,x_test,y_test,cmap='Blues_r')
Posted by: Guest on October-09-2021
0

LightGBM

lgb.plot_metric(model)
Posted by: Guest on October-09-2021

Python Answers by Framework

Browse Popular Code Answers by Language