plot_simu_and_theo#

actinvoting.plot_simu_and_theo(equivalent_probas=None, monte_carlo_probas=None, exact_probas=None, ns_equivalent_probas=None, ns_monte_carlo_probas=None, ns_exact_probas=None, label_equivalent='Theoretical equivalent', label_monte_carlo='Monte-Carlo results', label_exact='Exact results', x_label='Number of voters $n$', y_label='$\\mathbb{P}(m \\text{ is CW})$', log_scale=False, xmax=None, legend_loc=None, verbose=True, file_name=None)[source]#

Plot the theoretical, Monte-Carlo and exact probabilities of the Condorcet winner as functions of n.

Parameters:
  • equivalent_probas (list of floats) – Values of the theoretical equivalent for each n in ns_equivalent_probas.

  • monte_carlo_probas (list of floats) – Values of the Monte-Carlo estimates for each n in ns_monte_carlo_probas.

  • exact_probas (list of floats) – Values of the exact probabilities for each n in ns_exact_probas.

  • ns_equivalent_probas (list of ints) – Values of n for which the theoretical equivalent has been computed.

  • ns_monte_carlo_probas (list of ints) – Values of n for which the Monte-Carlo estimates have been computed.

  • ns_exact_probas (list of ints) – Values of n for which the exact probabilities have been computed.

  • label_equivalent (str) – Label for the theoretical equivalent in the plot.

  • label_monte_carlo (str) – Label for the Monte-Carlo estimates in the plot.

  • label_exact (str) – Label for the exact probabilities in the plot.

  • x_label (str) – Label for the x-axis.

  • y_label (str) – Label for the y-axis.

  • log_scale (bool) – Whether to use a log scale for the y-axis.

  • xmax (float) – Maximum value for the x-axis. If specified, the minimal value is set to 0.

  • legend_loc – The location of the legend.

  • verbose – Whether to print the data.

  • file_name – If not None, the plot is saved in a file with this name, using tikzplotlib.