Validate weights are positive values. (#6115)

This commit is contained in:
Jiaming Yuan
2020-09-15 09:03:55 +08:00
committed by GitHub
parent c6f2b8c841
commit b5f52f0b1b
6 changed files with 15 additions and 9 deletions

View File

@@ -39,7 +39,7 @@ class IterForDMatrixDemo(xgboost.core.DataIter):
rng = cupy.random.RandomState(1994)
self._data = [rng.randn(self.rows, self.cols)] * BATCHES
self._labels = [rng.randn(self.rows)] * BATCHES
self._weights = [rng.randn(self.rows)] * BATCHES
self._weights = [rng.uniform(size=self.rows)] * BATCHES
self.it = 0 # set iterator to 0
super().__init__()