ja-thomas / autoxgboost

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

How to get optimal value of a parameter "nrounds" #68

Closed AsiaHenzel closed 4 years ago

AsiaHenzel commented 4 years ago

How to get a value of an optimal nrounds?

When I print results I can see it but I can't find it in any list returned by AutoxgbResult.

It would be a good idea to return the optimal value of this parameter too.

AsiaHenzel commented 4 years ago

Ok, I know already. You can use a function:

get_best_nrounds <- function(res) {
  res$optim.result$opt.path$env$extra[[res$optim.result$best.ind]]$nrounds
}

Where res is a result of an function autoxgboost.