remove redundant method in expand_entry (#9283)
This commit is contained in:
parent
152e2fb072
commit
2b76061659
@ -42,12 +42,6 @@ struct GPUExpandEntry {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ChildIsValid(const TrainParam& param, int depth, int num_leaves) {
|
|
||||||
if (param.max_depth > 0 && depth >= param.max_depth) return false;
|
|
||||||
if (param.max_leaves > 0 && num_leaves >= param.max_leaves) return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bst_float GetLossChange() const {
|
bst_float GetLossChange() const {
|
||||||
return split.loss_chg;
|
return split.loss_chg;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,12 +26,6 @@ struct ExpandEntryImpl {
|
|||||||
}
|
}
|
||||||
[[nodiscard]] bst_node_t GetNodeId() const { return nid; }
|
[[nodiscard]] bst_node_t GetNodeId() const { return nid; }
|
||||||
|
|
||||||
static bool ChildIsValid(TrainParam const& param, bst_node_t depth, bst_node_t num_leaves) {
|
|
||||||
if (param.max_depth > 0 && depth >= param.max_depth) return false;
|
|
||||||
if (param.max_leaves > 0 && num_leaves >= param.max_leaves) return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool IsValid(TrainParam const& param, bst_node_t num_leaves) const {
|
[[nodiscard]] bool IsValid(TrainParam const& param, bst_node_t num_leaves) const {
|
||||||
return static_cast<Impl const*>(this)->IsValidImpl(param, num_leaves);
|
return static_cast<Impl const*>(this)->IsValidImpl(param, num_leaves);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user