exactalgorithmbase

class corankco.algorithms.exact.exactalgorithmbase.ExactAlgorithmBase(optimize: bool = True)

An abstract base class for exact algorithms. This class outlines the interface that all exact algorithms must implement.

abstract compute_consensus_rankings(dataset: Dataset, scoring_scheme: ScoringScheme, return_at_most_one_ranking=True, bench_mode=False) Consensus

Abstract method to compute consensus rankings.

Parameters:
  • dataset – A dataset containing the rankings to aggregate.

  • scoring_scheme – The penalty vectors to consider.

  • return_at_most_one_ranking – The algorithm should not return more than one ranking.

  • bench_mode – Is bench mode activated. If False, the algorithm may return more information.

Returns:

One or more consensus rankings.

abstract get_full_name() str

Abstract method to get the full name of the algorithm.

Returns:

The full name of the algorithm as a string.

abstract is_scoring_scheme_relevant_when_incomplete_rankings(scoring_scheme: ScoringScheme) bool

Abstract method to check if the scoring scheme is relevant when rankings are incomplete.

Parameters:

scoring_scheme – The scoring scheme to check.

Returns:

True if the scoring scheme is relevant, False otherwise.

exception corankco.algorithms.exact.exactalgorithmbase.IncompatibleArgumentsException