# How to know if GBM or XGBOOST are overfitting? [duplicate]

Unlike in random forest, I can check the oob_score_ to verify how much my model is overfitting. How can I verify this for boosted trees algorithms?

Currently, Using GBM I'm getting a accuracy of 95% on training set and 87% on test set. These numbers are after tuning on my validation set. How do I judge if this model is good enough or not?

Also, I ran 10 K-fold cv and my variance is around 1% for test set.

UPDATE: I'm using SMOTE to balance my classes

• "How do I judge if this model is good enough or not?" Good enough for what? What's the error tolerance on your problem? What are the costs for each kind of error? – Sycorax May 1 '18 at 18:39
• Ideally, the difference between the training score and the test score should be as close as possible. Sometimes, this is not feasible though. Another note. You have to measure your test set accuracy on real data (i.e. without SMOTEing them). – Stergios May 2 '18 at 8:02

• Thanks, but what kind of details are you looking for cross-validation. I ran the cross_val_score on my validation test set, the model has only seen the training set and not test/validation. Also, I'm using SMOTE to balanced my classes, not sure if that has anything to do here – Jaskaran Singh Puri May 2 '18 at 4:57