danf0 commited on
Commit
4af5648
1 Parent(s): e094451

Update README.

Browse files
Files changed (1) hide show
  1. README.md +6 -4
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 a positive semi-definite matrix $K \in \mathbb{R}^{n \times n}$ of similarity scores, the score is defined as:
25
- $$\mathrm{VS}(K) = \exp(-\mathrm{tr}(K/n \log K/n)) = \exp(-\sum_{i=1}^n \lambda_i \log \lambda_i),$$
26
- where $\lambda_i$ are the eigenvalues of $K/n$ and $0 \log 0 = 0$.
27
- 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.
 
 
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`.