Refactor fast-hist, add tests for some updaters. (#3836)

Add unittest for prune.

Add unittest for refresh.

Refactor fast_hist.

* Remove fast_hist_param.
* Rename to quantile_hist.

Add unittests for QuantileHist.

* Refactor QuantileHist into .h and .cc file.
* Remove sync.h.
* Remove MGPU_mock test.

Rename fast hist method to quantile hist.
This commit is contained in:
Jiaming Yuan
2018-11-07 21:15:07 +13:00
committed by GitHub
parent 2b045aa805
commit 19ee0a3579
30 changed files with 1366 additions and 983 deletions

View File

@@ -11,7 +11,6 @@
#include <limits>
#include <vector>
#include "row_set.h"
#include "../tree/fast_hist_param.h"
#include "../tree/param.h"
#include "./quantile.h"
@@ -19,8 +18,6 @@ namespace xgboost {
namespace common {
using tree::FastHistParam;
/*! \brief sums of gradient statistics corresponding to a histogram bin */
struct GHistEntry {
/*! \brief sum of first-order gradient statistics */
@@ -145,7 +142,7 @@ class GHistIndexBlockMatrix {
public:
void Init(const GHistIndexMatrix& gmat,
const ColumnMatrix& colmat,
const FastHistParam& param);
const tree::TrainParam& param);
inline GHistIndexBlock operator[](size_t i) const {
return {blocks_[i].row_ptr_begin, blocks_[i].index_begin};