Set ndcg to default for LTR. (#8822)

- Add document.
- Add tests.
- Use `ndcg` with `topk` as default.
This commit is contained in:
Jiaming Yuan
2023-06-09 23:31:33 +08:00
committed by GitHub
parent e4dd6051a0
commit 1fcc26a6f8
18 changed files with 842 additions and 19 deletions

View File

@@ -220,7 +220,7 @@ class GpuXGBoostRegressorSuite extends GpuTestSuite {
test("Ranking: train with Group") {
withGpuSparkSession(enableCsvConf()) { spark =>
val xgbParam = Map("eta" -> 0.1f, "max_depth" -> 2, "objective" -> "rank:pairwise",
val xgbParam = Map("eta" -> 0.1f, "max_depth" -> 2, "objective" -> "rank:ndcg",
"num_round" -> 10, "num_workers" -> 1, "tree_method" -> "gpu_hist",
"features_cols" -> featureNames, "label_col" -> labelName)
val Array(trainingDf, testDf) = spark.read.option("header", "true").schema(schema)