flitsr.advanced.ranker.Ranker

class flitsr.advanced.ranker.Ranker

Bases: ABC

A Ranker technique takes a Spectrum and forms a Ranking of the elements in the the spectrum.

__init__()

Methods

__init__()

rank(spectrum, base_metric)

Provides the ranking functionality for the Ranker.

abstractmethod rank(spectrum: Spectrum, base_metric: str) Ranking

Provides the ranking functionality for the Ranker. Takes a Spectrum and a base_metric and returns a Ranking of the elements in the spectrum. Note that the technique does not need to use the base_metric.

Parameters:
  • spectrum – Spectrum: The spectrum whose elements to rank

  • base_metric – str: The name of the SBFL metric to optionally use within the technique to rank the elements.

Returns:

A Ranking of the elements in the spectrum.