-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added RankingEvaluatorOptions and removed the truncation limit. #4081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 57 commits
8749a10
fe25bf6
cb446be
b5ee220
b9a7471
80e238d
2ef424d
3958f01
56d4595
00bc7ef
d0462f1
87cefbc
c3a908b
c0a430a
0b55903
56983d5
3382d1d
8ca5d01
4ac459e
8f20ea4
f9f9e1d
21cb8f3
138f201
55e3460
e43bba3
421d713
4f4f81c
89082a5
f167af8
0d4d34f
6cd2f15
1424ab3
3ee03ca
34b7a91
5539127
02053a6
35ad3c0
0eb3e2b
a3291b1
37af437
68f1f35
5b90a34
0efe238
b6584aa
7d47832
0e99776
20a4490
0d111f4
72d1a4d
ea9ebed
013be4f
d2ae365
a9e6db8
5855f99
724bb12
d009f55
8f7b6cd
30d56a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -638,6 +638,21 @@ internal RankingTrainers(RankingCatalog catalog) | |
/// <param name="scoreColumnName">The name of the score column in <paramref name="data"/>.</param> | ||
/// <returns>The evaluation results for these calibrated outputs.</returns> | ||
public RankingMetrics Evaluate(IDataView data, | ||
string labelColumnName = DefaultColumnNames.Label, | ||
string rowGroupColumnName = DefaultColumnNames.GroupId, | ||
string scoreColumnName = DefaultColumnNames.Score) => Evaluate(data, null, labelColumnName, rowGroupColumnName, scoreColumnName); | ||
|
||
/// <summary> | ||
/// Evaluates scored ranking data. | ||
/// </summary> | ||
/// <param name="data">The scored data.</param> | ||
/// <param name="options">Options to control the evaluation result.</param> | ||
/// <param name="labelColumnName">The name of the label column in <paramref name="data"/>.</param> | ||
/// <param name="rowGroupColumnName">The name of the groupId column in <paramref name="data"/>.</param> | ||
/// <param name="scoreColumnName">The name of the score column in <paramref name="data"/>.</param> | ||
/// <returns>The evaluation results for these calibrated outputs.</returns> | ||
public RankingMetrics Evaluate(IDataView data, | ||
RankingEvaluatorOptions options, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add at least one new test for this new API? #Resolved There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And ensure there is an existing unit test covering the existing MAML interface for It should look about like: Specifically the The output should end in a block of DCG/NDCG@N metrics:
And it should match the |
||
string labelColumnName = DefaultColumnNames.Label, | ||
string rowGroupColumnName = DefaultColumnNames.GroupId, | ||
string scoreColumnName = DefaultColumnNames.Score) | ||
|
@@ -647,7 +662,7 @@ public RankingMetrics Evaluate(IDataView data, | |
Environment.CheckNonEmpty(scoreColumnName, nameof(scoreColumnName)); | ||
Environment.CheckNonEmpty(rowGroupColumnName, nameof(rowGroupColumnName)); | ||
|
||
var eval = new RankingEvaluator(Environment, new RankingEvaluator.Arguments() { }); | ||
var eval = new RankingEvaluator(Environment, options ?? new RankingEvaluatorOptions() { }); | ||
return eval.Evaluate(data, labelColumnName, rowGroupColumnName, scoreColumnName); | ||
} | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.