flitsr.advanced.sbfl.SBFL

class flitsr.advanced.sbfl.SBFL(tiebrk: Tiebrk = Tiebrk.ORIG)

Bases: Ranker

Disables the FLITSR algorithm so that only the base metric is used to produce the ranking. This is equivalent to using the base metric as-is, but allows the user to run these metrics within the FLITSR framework

__init__(tiebrk: Tiebrk = Tiebrk.ORIG)

Methods

__init__([tiebrk])

rank(spectrum, base_metric)

Provides the ranking functionality for the Ranker.

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.