Accept histogram cut instead gradient index in evaluation. (#7336)
This commit is contained in:
@@ -13,7 +13,8 @@ TEST(GradientIndex, ExternalMemory) {
|
||||
std::unique_ptr<DMatrix> dmat = CreateSparsePageDMatrix(10000);
|
||||
std::vector<size_t> base_rowids;
|
||||
std::vector<float> hessian(dmat->Info().num_row_, 1);
|
||||
for (auto const& page : dmat->GetBatches<GHistIndexMatrix>({0, 64, hessian})) {
|
||||
for (auto const &page : dmat->GetBatches<GHistIndexMatrix>(
|
||||
{GenericParameter::kCpuId, 64, hessian})) {
|
||||
base_rowids.push_back(page.base_rowid);
|
||||
}
|
||||
size_t i = 0;
|
||||
|
||||
@@ -58,7 +58,7 @@ template <typename GradientSumT> void TestEvaluateSplits() {
|
||||
entries.front().depth = 0;
|
||||
|
||||
evaluator.InitRoot(GradStats{total_gpair});
|
||||
evaluator.EvaluateSplits(hist, gmat, tree, &entries);
|
||||
evaluator.EvaluateSplits(hist, gmat.cut, tree, &entries);
|
||||
|
||||
auto best_loss_chg =
|
||||
evaluator.Evaluator().CalcSplitGain(
|
||||
|
||||
Reference in New Issue
Block a user