Add more tests and doc for QDM. (#10692)
This commit is contained in:
@@ -17,6 +17,7 @@ from xgboost.testing import (
|
||||
)
|
||||
from xgboost.testing.data import check_inf, np_dtypes
|
||||
from xgboost.testing.data_iter import run_mixed_sparsity
|
||||
from xgboost.testing.quantile_dmatrix import check_ref_quantile_cut
|
||||
|
||||
|
||||
class TestQuantileDMatrix:
|
||||
@@ -266,6 +267,9 @@ class TestQuantileDMatrix:
|
||||
dm_results["dvalid"]["rmse"], qdm_results["valid"]["rmse"]
|
||||
)
|
||||
|
||||
def test_ref_quantile_cut(self) -> None:
|
||||
check_ref_quantile_cut("cpu")
|
||||
|
||||
def test_ref_dmatrix(self) -> None:
|
||||
rng = np.random.RandomState(1994)
|
||||
self.run_ref_dmatrix(rng, "hist", True)
|
||||
|
||||
@@ -412,4 +412,4 @@ class TestTreeMethod:
|
||||
@pytest.mark.skipif(**tm.no_pandas())
|
||||
@pytest.mark.parametrize("tree_method", ["hist"])
|
||||
def test_get_quantile_cut(self, tree_method: str) -> None:
|
||||
check_get_quantile_cut(tree_method)
|
||||
check_get_quantile_cut(tree_method, "cpu")
|
||||
|
||||
Reference in New Issue
Block a user