algorithm_choice

wield.control.utilities.algorithm_choice

This module includes the set of helper functions to maintain the algorithm ranking lists for controls classes.

Even though there is typically a preferred algorithm for many actions, the helper list is useful for comparing between the performance of different algorithms and implementations.

Module Attributes

algorithm_choices_defaults

This is a mapping of text names to algorithm functions

algorithm_mappings_name2func

This is a mapping of algorithm functions to text names

algorithm_mappings_func2name

This is a mapping of algorithm functions to default rankings

Functions

algo2ranking(choices)

algo_merge(choicesA, choicesB)

Takes two algorithm_choices dictionaries and merges them into a single dictionary.

algo_merge_full(choicesA, rankingA, ...)

merges choices and generates rankings.

algo_run(algotype, rankings[, args, kwargs, ...])

Runs the algorithm functions in order.

algorithm_register(typename, textname, func, ...)

choices_and_rankings(algorithm_choices, ...)

Exceptions

AlgorithmError

Error to raise if algorithm is failing

Details

algo2ranking(choices)[source][github]
algo_merge(choicesA, choicesB)[source][github]

Takes two algorithm_choices dictionaries and merges them into a single dictionary. Raises a warning if rankings end up identical.

algo_merge_full(choicesA, rankingA, choicesB, rankingB)[source][github]

merges choices and generates rankings. If the choices are the same, then less work is done

algo_run(algotype, rankings, args=(), kwargs={}, choice=None)[source][github]

Runs the algorithm functions in order. Exceptions cause a later algorithm to be run

choice = specifically choose the algorithm to run

algorithm_register(typename, textname, func, rank)[source][github]
choices_and_rankings(algorithm_choices, algorithm_ranking)[source][github]
exception AlgorithmError[source][github]

Error to raise if algorithm is failing