Skip to content

Commit

Permalink
Cleaning up search metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Dec 3, 2024
1 parent 8727270 commit 21ece38
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
public class SearchMetrics {

private final int k;

private double dcg = 0.0;
private double ndcg = 0.0;
private double precision = 0.0;
private final double dcg;
private final double ndcg;
private final double precision;

/**
* Create the search metrics for an entire query set.
Expand All @@ -35,6 +34,9 @@ public SearchMetrics(final List<QueryResult> queryResults, final List<Judgment>
this.k = k;

// TODO: Calculate the metrics for the whole query set.
this.dcg = 0.0;
this.ndcg = 0.0;
this.precision = 0.0;
}

/**
Expand All @@ -48,6 +50,9 @@ public SearchMetrics(final String query, final List<String> orderedDocumentIds,
this.k = k;

// TODO: Calculate the metrics for the single query.
this.dcg = 0.0;
this.ndcg = 0.0;
this.precision = 0.0;
}

/**
Expand Down

0 comments on commit 21ece38

Please sign in to comment.