Spaces:
Build error
Build error
Update README.
Browse files
README.md
CHANGED
|
@@ -21,10 +21,12 @@ See the project's README at https://github.com/vertaix/Vendi-Score for more info
|
|
| 21 |
## Metric Description
|
| 22 |
The Vendi Score (VS) is a metric for evaluating diversity in machine learning.
|
| 23 |
The input to metric is a collection of samples and a pairwise similarity function, and the output is a number, which can be interpreted as the effective number of unique elements in the sample.
|
| 24 |
-
Specifically, given
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
|
| 29 |
## How to Use
|
| 30 |
The Vendi Score is available as a Python package or in HuggingFace `evaluate`.
|
|
|
|
| 21 |
## Metric Description
|
| 22 |
The Vendi Score (VS) is a metric for evaluating diversity in machine learning.
|
| 23 |
The input to metric is a collection of samples and a pairwise similarity function, and the output is a number, which can be interpreted as the effective number of unique elements in the sample.
|
| 24 |
+
Specifically, given an `n x n` positive semi-definite matrix `K` of similarity scores, the score is defined as:
|
| 25 |
+
```
|
| 26 |
+
VS(K) = exp(tr(K/n @ log(K/n))) = exp(-sum_i lambda_i log lambda_i),
|
| 27 |
+
```
|
| 28 |
+
where `lambda_i` are the eigenvalues of `K/n` and `0 log 0 = 0`.
|
| 29 |
+
That is, the Vendi Score is equal to the exponential of the von Neumann entropy of `K/n`, or the Shannon entropy of the eigenvalues, which is also known as the effective rank.
|
| 30 |
|
| 31 |
## How to Use
|
| 32 |
The Vendi Score is available as a Python package or in HuggingFace `evaluate`.
|