Skip to content

Commit

Permalink
Fix r tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Apr 14, 2020
1 parent 8297b83 commit 2a523fe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions R-package/tests/testthat/test_basic.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ test_that("dart prediction works", {
one_drop = TRUE,
nthread = 1,
tree_method= "exact",
verbosity = 3,
objective = "reg:squarederror"
),
data = dtrain,
Expand Down Expand Up @@ -329,7 +328,7 @@ test_that("colsample_bytree works", {
watchlist <- list(train = dtrain, eval = dtest)
# Use colsample_bytree = 0.01, so that roughly one out of 100 features is
# chosen for each tree
param <- list(max_depth = 2, eta = 0, verbosity = 0, nthread = 2,
param <- list(max_depth = 2, eta = 0, nthread = 2,
colsample_bytree = 0.01, objective = "binary:logistic",
eval_metric = "auc")
set.seed(2)
Expand Down
2 changes: 1 addition & 1 deletion src/gbm/gbtree.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct GBTreeTrainParam : public XGBoostParameter<GBTreeTrainParam> {
.describe("Number of parallel trees constructed during each iteration."\
" This option is used to support boosted random forest.");
DMLC_DECLARE_FIELD(updater_seq)
.set_default("grow_colmaker,prune")
.set_default("grow_colmaker")
.describe("Tree updater sequence.");
DMLC_DECLARE_FIELD(process_type)
.set_default(TreeProcessType::kDefault)
Expand Down
2 changes: 1 addition & 1 deletion src/tree/updater_colmaker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ class ColMaker: public TreeUpdater {
}

char const* Name() const override {
return "grow_colmaker";
return "grow_colmaker_deprecated";
}

void LazyGetColumnDensity(DMatrix *dmat) {
Expand Down
5 changes: 2 additions & 3 deletions src/tree/updater_exact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,9 @@ size_t MultiExact<GradientT>::ExpandTree(RegTree *p_tree,
for (size_t n = node_shift_; n < nodes_split_.size(); ++n) {
SplitEntry& split = nodes_split_.at(n);
auto weight =
value_constraints_.CalcWeight(split.parent_sum, split.nidx, param_) *
param_.learning_rate;
value_constraints_.CalcWeight(split.parent_sum, split.nidx, param_);
if (!split.IsValid(tree.GetDepth(split.nidx), leaves, param_)) {
tree.SetLeaf(weight.vec, split.nidx,
tree.SetLeaf((weight * param_.learning_rate).vec, split.nidx,
split.parent_sum.GetHess().vec);
CHECK_EQ(is_splitable_[split.nidx], 1);
is_splitable_[split.nidx] = 0;
Expand Down

0 comments on commit 2a523fe

Please sign in to comment.