Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
kampersanda committed Oct 26, 2024
1 parent a35b6be commit 1641eb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions elinor-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ elinor-evaluate \

The available metrics are shown in [Metric](https://docs.rs/elinor/latest/elinor/metrics/enum.Metric.html).

The output will show the basic statistics and the macro-averaged scores for each metric:
The output will show several basic statistics and the macro-averaged scores for each metric:

```
n_queries_in_true 8
n_queries_in_pred 8
n_docs_in_true 20
n_docs_in_pred 24
n_true_relevant_docs 14
n_relevant_docs 14
precision@3 0.5833
ap 0.8229
rr 0.8125
Expand Down
8 changes: 4 additions & 4 deletions elinor-cli/src/bin/evaluate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct Args {
#[arg(long)]
tab_separator: bool,

/// Metric to evaluate.
/// Metric to evaluate. If not specified, some default metrics are used.
#[arg(short, long, num_args = 1..)]
metrics: Vec<Metric>,
}
Expand Down Expand Up @@ -58,7 +58,7 @@ fn main() -> Result<()> {
println!("n_queries_in_pred\t{}", pred_rels.n_queries());
println!("n_docs_in_true\t{}", true_rels.n_docs());
println!("n_docs_in_pred\t{}", pred_rels.n_docs());
println!("n_true_relevant_docs\t{}", n_relevant_docs(&true_rels));
println!("n_relevant_docs\t{}", n_relevant_docs(&true_rels));

let mut columns = vec![];
for metric in metrics {
Expand Down Expand Up @@ -101,12 +101,12 @@ fn default_metrics() -> Vec<Metric> {
for k in [5, 10, 15, 20] {
metrics.push(Metric::Precision { k });
}
for k in [5, 10, 15, 20] {
for k in [5, 10, 15, 20, 0] {
metrics.push(Metric::AP { k });
}
metrics.push(Metric::RR { k: 0 });
for k in [5, 10, 15, 20] {
metrics.push(Metric::NDCG { k });
}
metrics.push(Metric::RR { k: 0 });
metrics
}

0 comments on commit 1641eb5

Please sign in to comment.