seqme.metrics.FBD#
- class seqme.metrics.FBD(reference, embedder, *, name='FBD')[source]#
Fréchet Biological Distance (FBD) between a set of generated sequences and a reference dataset based on their embeddings.
This metric estimates how similar the distributions of two groups of embeddings are using the Wasserstein-2 (Fréchet) distance. It is analogous to the Fréchet Inception Distance (FID) [1], except that the embeddings are obtained from a biologically relevant model rather than InceptionNet.
References
- [1] Heusel et al., “GANs Trained by a Two Time-Scale Update Rule Converge to a
Local Nash Equilibrium” (https://arxiv.org/abs/1706.08500)
- __init__(reference, embedder, *, name='FBD')[source]#
Initializes the metric with a reference dataset and an embedding function.
- Parameters:
- Raises:
ValueError – If fewer than 2 reference embeddings are provided.
- __call__(sequences)[source]#
Compute the FBD between the reference and the input sequences.
- Parameters:
- Returns:
FBD score.
- Return type:
Methods
Attributes
|
Name of the metric. |
|
Whether lower or higher scores indicate better performance. |