seqme.Metric#

class seqme.Metric[source]#

Abstract base class for defining a metric.

Subclasses implement a callable interface to compute the metric and specify a name and optimization direction.

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

Calculate the metric for the provided sequences.

Parameters:

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

Return type:

MetricResult

Returns:

An object containing the metric value and optional deviation.

Methods

__init__()

__call__(sequences)

Calculate the metric for the provided sequences.

Attributes

name

Name of the metric.

objective

Whether lower or higher scores indicate better performance.