ExperimentsCompiler#
- class svvamp.ExperimentsCompiler(prefix_tikz_file, tikz_directory='tikz', results_directory='out', figsize=(16, 8), ignore_rules_abbr=None)[source]#
Compile the results of several experiments.
Each experiment should be analyzed with ExperimentAnalyzer. Then ExperimentsCompiler compiles the analyses.
- Parameters:
prefix_tikz_file (str) – Prefix for the names of the tikz files.
tikz_directory (str or Path) – Directory where to save the tikz files.
results_directory (str or Path) – Directory where to fetch the results obtained with ExperimentAnalyzer.
figsize (tuple) – Size of the figures.
ignore_rules_abbr (list of str) – List of rules to ignore, given as abbreviations.
- cm_complexity_index_bar_plot(tikz_file='cm_complexity_index_bar_plot.tex')[source]#
Bar plot: CM complexity index.
- cm_rate_bar_plot(n_c_equal=None, n_c_ge=None, n_c_le=None, f_rule_label=None, d_rule_color=None, d_bound_color=None, f_rule_value_used_for_color=None, tikz_file='cm_rate_bar_plot.tex', d_old_new=None)[source]#
Bar plot: CM rate.
- cm_tm_um_rate_bar_plot(tikz_file='cm_tm_um_rate_bar_plot.tex')[source]#
Bar plot: CM, TM and UM rates.
- cm_xm_rate_bar_plot(n_c_equal=None, n_c_ge=None, n_c_le=None, tikz_file='cm_xm_rate_bar_plot.tex')[source]#
Bar plot: CM and XM rates. [Beta feature]
- condorcet_consistency_bar_plot(tikz_file='condorcet_consistency_bar_plot.tex')[source]#
Bar plot: Condorcet consistency.
- line(criterion, label, label_above=True, n_c_equal=None, n_c_ge=None, n_c_le=None, color=None)[source]#
Draw a line for some criterion on the profiles.
- loss_social_welfare_bar_plot(tikz_file='loss_social_welfare_bar_plot.tex')[source]#
Bar plot: loss of social welfare.
- my_tikzplotlib_save(tikz_file, x_ticks_labels=None, axis_width='\\axisWidth', axis_height='\\axisHeight', d_old_new=None, transform_string=None, with_prefix=True)[source]#
Save a figure in tikz.
- nb_candidates_cm_bar_plot(tikz_file='nb_candidates_cm_bar_plot.tex')[source]#
Bar plot: Number of CM winners.
- nb_candidates_cm_line_plot(rules=None, tikz_file='nb_candidates_cm_line_plot.tex')[source]#
Line plot: Number of CM winners.
- nb_candidates_rate_line_plot(criterion='is_cm_', ylabel='CM rate', rules=None, remove_rules_with_high_uncertainty=False, d_rule_color=None, exponent_y_axis=1, tikz_file='nb_candidates_rate_line_plot.tex', d_old_new=None)[source]#
Line plot representing a rate as a function of the number of candidates.
- profile_features_bar_plot(tikz_file='profile_features_bar_plot.tex')[source]#
Bar plot: Features of the profiles (existence of Condorcet winner, etc).
- profiles_scatter_plot(tikz_file='profiles_scatter_plot.tex')[source]#
Scatter plot: Number of voters and candidates of the profiles.
- pscw_line(n_c_equal=None, n_c_ge=None, n_c_le=None, d_bound_color=None)[source]#
Draw the ‘PSCW’ line.
- rate_bar_plot(criterion, ylabel, tikz_file, n_c_equal=None, n_c_ge=None, n_c_le=None, f_rule_label=None, f_rule_value_used_for_color=None, d_rule_color=None, d_bound_color=None, draw_rcw_line=False, draw_pscw_line=False, draw_sscw_line=False, draw_scw_line=False, d_old_new=None)[source]#
Bar plot: Rate of some criterion (auxiliary function).
- replace_rule_names(x_ticks_labels)[source]#
Replace the x-labels with relevant abbreviations (auxiliary function).
- resistant_condorcet_line(n_c_equal=None, n_c_ge=None, n_c_le=None, d_bound_color=None)[source]#
Draw the ‘Resistant Condorcet’ line (upper bound of CM rate for Condorcet rules).
- scw_line(n_c_equal=None, n_c_ge=None, n_c_le=None, d_bound_color=None)[source]#
Draw the ‘SCW’ line.
- sscw_line(n_c_equal=None, n_c_ge=None, n_c_le=None, d_bound_color=None)[source]#
Draw the ‘SSCW’ line.