Skip to content

Commit 36cad67

Browse files
authored
Fix LightGBM Ranking sample runtime exception. (dotnet#3257)
1 parent 1724da8 commit 36cad67

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Ranking/LightGbmWithOptions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public static void Example()
2929
Booster = new GradientBooster.Options
3030
{
3131
FeatureFraction = 0.9
32-
}
32+
},
33+
RowGroupColumnName = "GroupId"
3334
});
3435

3536
// Fit this pipeline to the training Data.
@@ -43,7 +44,7 @@ public static void Example()
4344

4445
// Expected output:
4546
// DCG: @1:1.71, @2:3.88, @3:7.93
46-
// NDCG: @1:7.98, @2:12.14, @3:16.62
47+
// NDCG: @1:0.08, @2:0.12, @3:0.17
4748
}
4849
}
4950
}

0 commit comments

Comments
 (0)