Initial support for quantile loss. (#8750)
- Add support for Python. - Add objective.
This commit is contained in:
@@ -146,6 +146,13 @@ def test_multioutput_reg() -> None:
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
|
||||
@pytest.mark.skipif(**tm.no_sklearn())
|
||||
def test_quantile_reg() -> None:
|
||||
script = os.path.join(PYTHON_DEMO_DIR, "quantile_regression.py")
|
||||
cmd = ['python', script]
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
|
||||
@pytest.mark.skipif(**tm.no_ubjson())
|
||||
def test_json_model() -> None:
|
||||
script = os.path.join(DEMO_DIR, "json-model", "json_parser.py")
|
||||
|
||||
@@ -10,7 +10,7 @@ from xgboost.testing.params import (
|
||||
exact_parameter_strategy,
|
||||
hist_parameter_strategy,
|
||||
)
|
||||
from xgboost.testing.updater import check_init_estimation
|
||||
from xgboost.testing.updater import check_init_estimation, check_quantile_loss
|
||||
|
||||
import xgboost as xgb
|
||||
from xgboost import testing as tm
|
||||
@@ -469,3 +469,7 @@ class TestTreeMethod:
|
||||
|
||||
def test_init_estimation(self) -> None:
|
||||
check_init_estimation("hist")
|
||||
|
||||
@pytest.mark.parametrize("weighted", [True, False])
|
||||
def test_quantile_loss(self, weighted: bool) -> None:
|
||||
check_quantile_loss("hist", weighted)
|
||||
|
||||
Reference in New Issue
Block a user