flitsr.advanced.flitsr.Flitsr¶
- class flitsr.advanced.flitsr.Flitsr(args: Args | None = None, internal_ranking: str = 'auto', tiebrk: Tiebrk = Tiebrk.ORIG, default_metric: str = 'ochiai')¶
Bases:
RankerRun the main FLITSR algorithm over the spectrum to produce ranked lists.
- __init__(args: Args | None = None, internal_ranking: str = 'auto', tiebrk: Tiebrk = Tiebrk.ORIG, default_metric: str = 'ochiai')¶
Changed in version 2.4.0: Added the default_metric optional argument
Methods
__init__([args, internal_ranking, tiebrk, ...])flitsr(spectrum, formula)Executes the recursive flitsr algorithm to identify faulty elements
flitsr_ordering(spectrum, basis, ranking[, ...])Order the given flitsr basis using the specified ordering strategy.
get_inverse_confidence_scores(spectrum, basis)Using the given basis and spectrum, calculates the confidence scores for each basis element.
rank(spectrum, formula)Provides the ranking functionality for the
Ranker.remove_faulty_elements(spectrum, ...)Removes all tests that execute an 'actually' faulty element
run_metric(spectrum, formula)- flitsr(spectrum: Spectrum, formula: str) List[Group]¶
Executes the recursive flitsr algorithm to identify faulty elements
- flitsr_ordering(spectrum: Spectrum, basis: List[Group], ranking: Ranking, flitsr_order='auto') List[Group]¶
Order the given flitsr basis using the specified ordering strategy. Strategies include ‘auto’, ‘conf’, ‘original’, ‘reverse’, and ‘flitsr’. ‘flitsr’ preserves the current ordering of the basis, ‘reverse’ reverses this order (i.e. order elements were identified by flitsr), ‘original’ orders elements by their position in the original ranking (given by ranking). ‘conf’ gets the confidence scores for each element and orders by these. ‘auto’ also gets the confidence scores for each element and uses them to pick which strategy to use (either ‘flitsr’, ‘original’ or ‘conf’).
- get_inverse_confidence_scores(spectrum: Spectrum, basis: List[Group]) List[int]¶
Using the given basis and spectrum, calculates the confidence scores for each basis element. The confidence scores returned are the inverse of the actual confidence scores.
- rank(spectrum: Spectrum, formula: str) Ranking¶
Provides the ranking functionality for the
Ranker. Takes aSpectrumand a base_metric and returns aRankingof 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
Rankingof the elements in the spectrum.