seqme.metrics.Uniqueness

seqme.metrics.Uniqueness#

class seqme.metrics.Uniqueness[source]#

Fraction of unique sequences within a provided list of sequences.

The uniqueness score is defined as:

\[\text{uniqueness} = \frac{|\mathrm{unique}(S)|}{|S|}\]

where \(S\) is the set of input sequences and \(|\mathrm{unique}(S)|\) is the number of distinct sequences.

__init__()#
__call__(sequences)[source]#

Compute the fraction of sequences remaining after removing any duplicate sequences.

Example

If sequences contains ["KR", "KR"], the uniqueness is 0.5.

Parameters:

sequences (list[str]) – Sequences to evaluate.

Returns:

Uniqueness.

Return type:

MetricResult

Methods

__init__()

__call__(sequences)

Compute the fraction of sequences remaining after removing any duplicate sequences.

Attributes

name

Name of the metric.

objective

Whether lower or higher scores indicate better performance.