Revert ntree limit fix (#6616)
The old (before fix) best_ntree_limit ignores the num_class parameters, which is incorrect. In before we workarounded it in c++ layer to avoid possible breaking changes on other language bindings. But the Python interpretation stayed incorrect. The PR fixed that in Python to consider num_class, but didn't remove the old workaround, so tree calculation in predictor is incorrect, see PredictBatch in CPUPredictor.
This commit is contained in:
@@ -933,9 +933,9 @@ class TestWithDask:
|
||||
def test_feature_weights(self, client: "Client") -> None:
|
||||
kRows = 1024
|
||||
kCols = 64
|
||||
|
||||
X = da.random.random((kRows, kCols), chunks=(32, -1))
|
||||
y = da.random.random(kRows, chunks=32)
|
||||
rng = da.random.RandomState(1994)
|
||||
X = rng.random_sample((kRows, kCols), chunks=(32, -1))
|
||||
y = rng.random_sample(kRows, chunks=32)
|
||||
|
||||
fw = np.ones(shape=(kCols,))
|
||||
for i in range(kCols):
|
||||
|
||||
Reference in New Issue
Block a user