Spaces:
Runtime error
Runtime error
JP-SystemsX
commited on
Commit
Β·
fd58845
1
Parent(s):
51467b5
Update README.md
Browse files
README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
---
|
2 |
title: nDCG
|
3 |
emoji: π
|
4 |
-
colorFrom:
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
sdk_version: 3.9.1
|
@@ -20,7 +20,7 @@ description: >-
|
|
20 |
2. Documents/Labels are relevant to different degrees
|
21 |
It is defined as the Sum over all relevances of the retrieved documents reduced logarithmically proportional to
|
22 |
the position in which they were retrieved.
|
23 |
-
The Normalized DCG (nDCG) divides the resulting value by the
|
24 |
0 and 1 s.t. a perfect retrieval achieves a nDCG of 1.
|
25 |
---
|
26 |
|
@@ -50,25 +50,26 @@ print(results)
|
|
50 |
```
|
51 |
|
52 |
### Inputs:
|
53 |
-
**references** (
|
54 |
|
55 |
-
**predictions** (
|
56 |
|
57 |
-
**k** (int): If set to a value only the k highest scores in the ranking will be considered, else considers all outputs.
|
58 |
Defaults to None.
|
59 |
|
60 |
**sample_weight** (`list` of `float`): Sample weights Defaults to None.
|
61 |
|
62 |
-
**ignore_ties** (
|
63 |
for efficiency gains. Defaults to False.
|
64 |
|
65 |
### Output:
|
66 |
-
**normalized_discounted_cumulative_gain** (
|
67 |
Minimum possible value is 0.0 Maximum possible value is 1.0
|
68 |
|
69 |
Output Example(s):
|
70 |
```python
|
71 |
{'nDCG@5': 1.0}
|
|
|
72 |
```
|
73 |
This metric outputs a dictionary, containing the nDCG score
|
74 |
|
|
|
1 |
---
|
2 |
title: nDCG
|
3 |
emoji: π
|
4 |
+
colorFrom: yellow
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
sdk_version: 3.9.1
|
|
|
20 |
2. Documents/Labels are relevant to different degrees
|
21 |
It is defined as the Sum over all relevances of the retrieved documents reduced logarithmically proportional to
|
22 |
the position in which they were retrieved.
|
23 |
+
The Normalized DCG (nDCG) divides the resulting value by the best possible value to get a value between
|
24 |
0 and 1 s.t. a perfect retrieval achieves a nDCG of 1.
|
25 |
---
|
26 |
|
|
|
50 |
```
|
51 |
|
52 |
### Inputs:
|
53 |
+
**references** (`list` of `float`): True relevance
|
54 |
|
55 |
+
**predictions** (`list` of `float`): Either predicted relevance, probability estimates or confidence values
|
56 |
|
57 |
+
**k** (`int`): If set to a value only the k highest scores in the ranking will be considered, else considers all outputs.
|
58 |
Defaults to None.
|
59 |
|
60 |
**sample_weight** (`list` of `float`): Sample weights Defaults to None.
|
61 |
|
62 |
+
**ignore_ties** (`boolean`): If set to true, assumes that there are no ties (this is likely if predictions are continuous)
|
63 |
for efficiency gains. Defaults to False.
|
64 |
|
65 |
### Output:
|
66 |
+
**normalized_discounted_cumulative_gain** (`float`): The averaged nDCG scores for all samples.
|
67 |
Minimum possible value is 0.0 Maximum possible value is 1.0
|
68 |
|
69 |
Output Example(s):
|
70 |
```python
|
71 |
{'nDCG@5': 1.0}
|
72 |
+
{'nDCG': 0.876}
|
73 |
```
|
74 |
This metric outputs a dictionary, containing the nDCG score
|
75 |
|