algorithmChoice¶
- class corankco.algorithms.algorithmChoice.Algorithm(value)¶
Enum representing the available ranking algorithms.
- static get_all() List[Algorithm] ¶
Returns a list of all available algorithms.
- Returns:
A List of all the available algorithms.
- Return type:
List[Algorithm]
- static get_all_compatible_with_any_scoring_scheme() List[Algorithm] ¶
Returns a list of algorithms that are compatible with any scoring scheme.
The returned algorithms have implementations that can handle any scoring scheme.
- Returns:
A List of all the algorithms compatible with any scoring scheme.
- Return type:
List[Algorithm]
- class corankco.algorithms.algorithmChoice.AlgorithmEnumeration¶
Contains a list of classes for all available ranking algorithms.
- corankco.algorithms.algorithmChoice.get_algorithm(alg: Algorithm, parameters: Dict | None = None) MedianRanking ¶
Returns an instance of the specified algorithm.
- Parameters:
alg (Algorithm) – The algorithm to instantiate. Must be an instance of the Algorithm enum.
parameters (Dict, optional) – The parameters to pass to the algorithm’s constructor. If None, an empty dict will be used.
- Returns:
An instance of the specified algorithm.
- Return type:
- Raises:
TypeError – If alg is not an instance of Algorithm, or if parameters is not a dict.