Modifying n_tree during predict with num parallel trees


Hi Team!

It seems like if you want to use random forest like model with number of parallel trees fitted (up to all trees fitted simultaniously ones) you need to somehow modify num_trees during predict stage, otherwise you would get incorrect predictions

Ive seen something like best_ntreelimit = model$bestInd * num_parallel_tree

Why it can’t be used without any modifications?


I think the behavior is expected, since the parameter is called best_ntreelimit, which indicates the best number of trees.