Deterministic GPU histogram. (#5361)

* Use pre-rounding based method to obtain reproducible floating point
  summation.
* GPU Hist for regression and classification are bit-by-bit reproducible.
* Add doc.
* Switch to thrust reduce for `node_sum_gradient`.
This commit is contained in:
Jiaming Yuan
2020-03-04 15:13:28 +08:00
committed by GitHub
parent 9775da02d9
commit 8d06878bf9
18 changed files with 410 additions and 97 deletions

View File

@@ -1682,7 +1682,6 @@ class Booster(object):
if importance_type == 'weight':
# do a simpler tree dump to save time
trees = self.get_dump(fmap, with_stats=False)
fmap = {}
for tree in trees:
for line in tree.split('\n'):

View File

@@ -68,7 +68,9 @@ def plot_importance(booster, ax=None, height=0.2,
raise ValueError('tree must be Booster, XGBModel or dict instance')
if not importance:
raise ValueError('Booster.get_score() results in empty')
raise ValueError(
'Booster.get_score() results in empty. ' +
'This maybe caused by having all trees as decision dumps.')
tuples = [(k, importance[k]) for k in importance]
if max_num_features is not None: