From d4ab359be16bdcbd82213f5c14bf6d3eb791f3d8 Mon Sep 17 00:00:00 2001 From: tqchen Date: Sun, 7 Sep 2014 20:01:03 -0700 Subject: [PATCH] fix --- src/gbm/gbtree-inl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gbm/gbtree-inl.hpp b/src/gbm/gbtree-inl.hpp index 6688e3829..08d2164bc 100644 --- a/src/gbm/gbtree-inl.hpp +++ b/src/gbm/gbtree-inl.hpp @@ -282,7 +282,7 @@ class GBTree : public IGradBooster { tree::RegTree::FVec &feats = thread_temp[tid]; feats.Fill(batch[i]); for (size_t j = 0; j < trees.size(); ++j) { - int tid = trees[i]->GetLeafIndex(feats, info.GetRoot(ridx)); + int tid = trees[j]->GetLeafIndex(feats, info.GetRoot(ridx)); preds[ridx * mparam.num_trees + j] = static_cast(tid); } feats.Drop(batch[i]);