ja-thomas / autoxgboost

autoxgboost - Automatic tuning and fitting of xgboost
Other
120 stars 19 forks source link

Use best iteration in mbo objective instead of last iteration #56

Open giuseppec opened 5 years ago

giuseppec commented 5 years ago

If people use early.stopping.rounds = 500 or some other high value, this line : https://github.com/ja-thomas/autoxgboost/blob/b64048e603751bcba9b6e212c775baff8ababccb/R/autoxgboost.R#L171 always measures the performance of the last iteration, right? Shouldn't the "best iteration" be used instead of the last iteration?

ja-thomas commented 5 years ago

That's a good point. This could be easily done via adding ntreelimit to the learner and use it in the predict call.