You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current code in the RankingEvaluator.cs file has the MaxTruncationLevel for NDCG (Normalized Cumulative Gain Metric) set to 10. Also, the code currently throws an exception if the NDCG is set to a value > 10. This is a blocking issue for ranking because it prevents the ability to measure the quality of ranking with result sets > 10. For example, if you were attempting to rank a group of 100 results, with the MaxTruncationLevel of 10, you could only measure whether the first 10 results were ranked correctly.
Here's the code:
public RankingEvaluator(IHostEnvironment env, Arguments args)
: base(env, LoadName)
{
// REVIEW: What kind of checking should be applied to labelGains?
if (args.DcgTruncationLevel <= 0 || args.DcgTruncationLevel > Aggregator.Counters.MaxTruncationLevel)
throw Host.ExceptUserArg(nameof(args.DcgTruncationLevel), "DCG Truncation Level must be between 1 and {0}", Aggregator.Counters.MaxTruncationLevel);
Host.CheckUserArg(args.LabelGains != null, nameof(args.LabelGains), "Label gains cannot be null");
...
}
It appears from the //Review comment in the above code that this functionality hasn't been fully completed.
While I'm unsure what the MaxTruncationLevel value should be, I have seen on a ranking contest\example on Kaggle.com where one contest was measuring NDCG with a truncation level of up to 38.
I also noticed that in other parts of this file, the code indicates that a value between 0-100 should be allowed:
public Transform(IHostEnvironment env, IDataView input, string labelCol, string scoreCol, string groupCol,
int truncationLevel, Double[] labelGains)
: base(env, input, labelCol, scoreCol, groupCol, RegistrationName)
{
Host.CheckParam(0 < truncationLevel && truncationLevel < 100, nameof(truncationLevel),
"Truncation level must be between 1 and 99");
...
}
Also, refer to the linked bug since it is related to this scenario: [Ranker Evaluate doesn't allow you specify metric parameters.] (#2728)
The text was updated successfully, but these errors were encountered:
@nicolehaugen Apart from fixing the exception related to the truncation level, it appears that there is a request for making RankingEvaluator (and hence RankingEvaluator.Arguments) public (so that you don't have to do it through reflection).
Summary of changes:
Added RankingEvaluatorOptions class to control the output of evaluation
Removed hard coded truncation limit for the max truncation level
Added corresponding unit tests and maml tests
Fixes#3993
ghost
locked as resolved and limited conversation to collaborators
Mar 21, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The current code in the RankingEvaluator.cs file has the MaxTruncationLevel for NDCG (Normalized Cumulative Gain Metric) set to 10. Also, the code currently throws an exception if the NDCG is set to a value > 10. This is a blocking issue for ranking because it prevents the ability to measure the quality of ranking with result sets > 10. For example, if you were attempting to rank a group of 100 results, with the MaxTruncationLevel of 10, you could only measure whether the first 10 results were ranked correctly.
Here's the code:
It appears from the //Review comment in the above code that this functionality hasn't been fully completed.
While I'm unsure what the MaxTruncationLevel value should be, I have seen on a ranking contest\example on Kaggle.com where one contest was measuring NDCG with a truncation level of up to 38.
I also noticed that in other parts of this file, the code indicates that a value between 0-100 should be allowed:
Also, refer to the linked bug since it is related to this scenario: [Ranker Evaluate doesn't allow you specify metric parameters.] (#2728)
The text was updated successfully, but these errors were encountered: