corankco.algorithms.bioconsert package¶
Submodules¶
corankco.algorithms.bioconsert.bioco module¶
Module for BioCo algorithm. More details in BioCo docstring class.
- class corankco.algorithms.bioconsert.bioco.BioCo¶
Bases:
BioConsertBioCo is a BioConsert instance that uses Borda as starting point to improve its consensus with local search BioConsert is a heuristics for Kemeny-Young rank aggregation published in S.Cohen-Boulakia, A.Denise, S.Hamel. Using Medians to Generate Consensus Rankings for Biological Data. 6809. 73-90. 10.1007/978-3-642-22351-8_5, 2011. Complexity: O(nb_elements²) This algorithm is BioConsert, which uses Borda method as starting point (see details on BioConsert Class docstring). For time computation reasons, a part of this algorithm is written in C
- get_full_name() str¶
- Returns:
Bioco (BioConsert with [BordaCount] as starter algorithms)
corankco.algorithms.bioconsert.bioconsert module¶
- class corankco.algorithms.bioconsert.bioconsert.BioConsert(starting_algorithms=None)¶
Bases:
RankAggAlgorithm,PairwiseBasedAlgorithm- compute_consensus_rankings(dataset: Dataset, scoring_scheme: ScoringScheme, return_at_most_one_ranking=False, bench_mode=False) Consensus¶
Calculate and return the consensus rankings based on the given dataset and scoring scheme.
- Parameters:
dataset (Dataset) – The dataset of rankings to be aggregated.
scoring_scheme (ScoringScheme) – The scoring scheme to be used for calculating consensus.
return_at_most_one_ranking (bool) – If True, the algorithm should return at most one ranking.
bench_mode (bool) – If True, the algorithm may return additional information for benchmarking purposes.
- Returns:
Consensus rankings. If the algorithm is unable to provide multiple consensuses or
return_at_most_one_ranking is True, a single consensus ranking is returned. :rtype: Consensus :raise ScoringSchemeNotHandledException: When the algorithm cannot compute the consensus because the implementation does not support the given scoring scheme.
- get_full_name() str¶
Get the full name of the algorithm.
- Returns:
The full name of the algorithm.
- Return type:
str
- is_scoring_scheme_relevant_when_incomplete_rankings(scoring_scheme: ScoringScheme) bool¶
Check if the scoring scheme is relevant when the rankings are incomplete.
- Parameters:
scoring_scheme (ScoringScheme) – The scoring scheme to be checked.
- Returns:
True iif all the starting algorithms are compatible with the scoring scheme
- Return type:
bool
Module contents¶
Module for BioConsert and BioCo rank aggregation algorithms. BioCo inherits from BioConsert, defining [BordaCount] as starter.