Skip to content

Commit

Permalink
Using max rank parameter.
Browse files Browse the repository at this point in the history
Signed-off-by: jzonthemtn <[email protected]>
  • Loading branch information
jzonthemtn committed Dec 11, 2024
1 parent 5c09b61 commit cc951e6
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ public String calculateCoec(final Map<Integer, Double> rankAggregatedClickThroug
// Format: query_id, query, document, judgment
final Collection<Judgment> judgments = new LinkedList<>();

// Up to Rank R
final int maxRank = 20;

LOGGER.info("Count of queries: {}", clickthroughRates.size());

for(final String userQuery : clickthroughRates.keySet()) {
Expand All @@ -127,7 +124,7 @@ public String calculateCoec(final Map<Integer, Double> rankAggregatedClickThroug

double denominatorSum = 0;

for(int rank = 0; rank < maxRank; rank++) {
for(int rank = 0; rank < parameters.getMaxRank(); rank++) {

// The document's mean CTR at the rank.
final double meanCtrAtRank = rankAggregatedClickThrough.getOrDefault(rank, 0.0);
Expand Down

0 comments on commit cc951e6

Please sign in to comment.