From cc951e6086d1229cc1f93f4ae1eabc3469a6ae82 Mon Sep 17 00:00:00 2001 From: jzonthemtn Date: Wed, 11 Dec 2024 14:26:02 -0500 Subject: [PATCH] Using max rank parameter. Signed-off-by: jzonthemtn --- .../eval/judgments/clickmodel/coec/CoecClickModel.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/judgments/clickmodel/coec/CoecClickModel.java b/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/judgments/clickmodel/coec/CoecClickModel.java index d387ea2..b50ceb0 100644 --- a/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/judgments/clickmodel/coec/CoecClickModel.java +++ b/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/judgments/clickmodel/coec/CoecClickModel.java @@ -111,9 +111,6 @@ public String calculateCoec(final Map rankAggregatedClickThroug // Format: query_id, query, document, judgment final Collection judgments = new LinkedList<>(); - // Up to Rank R - final int maxRank = 20; - LOGGER.info("Count of queries: {}", clickthroughRates.size()); for(final String userQuery : clickthroughRates.keySet()) { @@ -127,7 +124,7 @@ public String calculateCoec(final Map 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);