TeamHG-Memex / tensorboard_logger

Log TensorBoard events without touching TensorFlow
MIT License
630 stars 50 forks source link

Tensorboard logger with XGBOOST or SCI-KIT Learn #30

Closed ghost closed 4 years ago

ghost commented 4 years ago

I'm trying to view training runs on tensorboard using the tensorboard logger, but I'm having a hard time following the instructions.

from sklearn.ensemble import AdaBoostClassifier
clf = AdaBoostClassifier(n_estimators=100, random_state=0)
clf.fit (x,y)

or

bst = dxgb.train(client, params, df_train, labels_train)

I want to see the errors/AUC curves logged so I can view in tensorboard.

How do I configure the logger to get the curve?

Thanks,

lopuhin commented 4 years ago

hi @vinhdiesal the scope of tensorboard_logger is more limited - it is able to plot how some metric changes during the course of training, but you'd need to get the value of the metric yourself and log it - you can view it as a "print" replacement. Not sure if any sklearn models directly expose metrics during training, except if you call partial_fit which is supported only for some model. With xgboost it should be possible I hope, but I never tried this. I assume by "AUC curve" you mean how AUC value changes.