* Remove `learning_rates`. It's been deprecated since we have callback. * Set `before_iteration` of `reset_learning_rate` to False to preserve the initial learning rate, and comply to the term "reset". Closes #4709. * Tests for various `tree_method`.
18 lines
558 B
Python
18 lines
558 B
Python
import numpy as np
|
|
import unittest
|
|
import sys
|
|
sys.path.append("tests/python")
|
|
# Don't import the test class, otherwise they will run twice.
|
|
import test_interaction_constraints as test_ic # noqa
|
|
rng = np.random.RandomState(1994)
|
|
|
|
|
|
class TestGPUInteractionConstraints(unittest.TestCase):
|
|
cputest = test_ic.TestInteractionConstraints()
|
|
|
|
def test_interaction_constraints(self):
|
|
self.cputest.run_interaction_constraints(tree_method='gpu_hist')
|
|
|
|
def test_training_accuracy(self):
|
|
self.cputest.training_accuracy(tree_method='gpu_hist')
|