Visualisation Module#

Module for the generation of visualisation for explaining rules.

class Visualiser[source]#
class MESVisualiser(profile, instance, outcome, verbose=False)[source]#

Class used to visualise the results of a MES election. The visualisation result consists of two pages: a summary page called ‘summary.html’ and a round by round analysis page called ‘round_analysis.html’.

Parameters:
  • profile (AbstractProfile) – The profile.

  • instance (Instance) – The election instance.

  • outcome (AllocationDetails) – The outcome of the election.

  • verbose (bool, optional) – Whether to print the results to the console. The default is False.

Return type:

None

render(output_folder_path, name='')[source]#

Render the visualisation.

Parameters:
  • output_folder_path (str) – The path to the folder where the visualisation will be saved.

  • name (str, optional) – The prefix of the output files. The default is “”.

Return type:

None

class GreedyWelfareVisualiser(profile, instance, outcome, verbose=False)[source]#

Class used to visualise the results of a Greedy Welfare election. The visualisation result consits of a round by round analysis page called ‘round_analysis.html’.

Parameters:
  • profile (AbstractProfile) – The profile.

  • instance (Instance) – The election instance.

  • outcome (AllocationDetails) – The outcome of the election.

  • verbose (bool, optional) – Whether to print the results to the console. The default is False.

Return type:

None

render(output_folder_path, name='')[source]#

Render the visualisation.

Parameters:
  • output_folder_path (str) – The path to the folder where the visualisation will be saved.

  • name (str, optional) – The prefix of the output files. The default is “”.

Return type:

None