Extract Sketch Entry from hist maker. (#7503)

* Extract Sketch Entry from hist maker.

* Add a new sketch container for sorted inputs.
* Optimize bin search.
This commit is contained in:
Jiaming Yuan
2021-12-18 05:36:56 +08:00
committed by GitHub
parent b4a1236cfc
commit 9ab73f737e
15 changed files with 393 additions and 217 deletions

View File

@@ -36,7 +36,7 @@ TEST(GradientIndex, FromCategoricalBasic) {
BatchParam p(0, max_bins);
GHistIndexMatrix gidx;
gidx.Init(m.get(), max_bins, {});
gidx.Init(m.get(), max_bins, false, {});
auto x_copy = x;
std::sort(x_copy.begin(), x_copy.end());