seqme.metrics.Novelty

seqme.metrics.Novelty#

class seqme.metrics.Novelty(reference, *, name='Novelty')[source]#

Fraction of sequences not in the reference set.

__init__(reference, *, name='Novelty')[source]#

Initialize the Novelty metric.

Parameters:
  • reference (list[str]) – A list of reference sequences against which generated sequences will be compared. Sequences found in this list are considered non-novel.

  • name (str) – Metric name.

__call__(sequences)[source]#

Compute the novelty as the proportion of input sequences that are not present in the reference set.

Parameters:

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

Returns:

The novelty score between 0 and 1,

where 0 indicates no novel sequences and 1 indicates all sequences are novel.

Return type:

MetricResult

Methods

__init__(reference, *[, name])

Initialize the Novelty metric.

__call__(sequences)

Compute the novelty as the proportion of input sequences that are not present in the reference set.

Attributes

name

Name of the metric.

objective

Whether lower or higher scores indicate better performance.