I've the following code
eval_set = [(X_train, y_train), (X_test, y_test)]
eval_metric = ["auc","error"]
In the following part, I'm training the XGBClassifier
model
model = XGBClassifier()
%time model.fit(X_train, y_train, eval_set=eval_set, eval_metric=eval_metric, verbose=True)
This gives me the metrics in the following format
[0] validation_0-auc:0.840532 validation_0-error:0.187758 validation_1-auc:0.84765 validation_1-error:0.17672
[1] validation_0-auc:0.840536 validation_0-error:0.187758 validation_1-auc:0.847665 validation_1-error:0.17672
....
[99] validation_0-auc:0.917587 validation_0-error:0.13846 validation_1-auc:0.918747 validation_1-error:0.137714
Wall time: 5 s
I made a DataFrame out of this and plotted between time (0-99) and the other metrics. Is there any other way to plot directly feeding the output?
model.evals_result()['sample name']['metric name']
list in plotting. See xgboost.readthedocs.io/en/latest/python/… for an example – Fumigant