geneticengine.visualization.per_gen_comparisons

Module Contents

Functions

plot_comparison(folder_names, labels[, labels_name, ...])

Plots a figure with lines for each folder (average with shades for std)

plot_fitness_comparison(folder_names, labels[, ...])

Plots a figure with lines for each folder (average with shades for std)

plot_test_fitness_comparison(folder_names, labels[, ...])

Plots a figure with lines for each folder (average with shades for std)

plot_nodes_comparison(folder_names, labels[, ...])

Plots a figure with lines for each folder (average with shades for std)

plot_prods_comparison(folder_name[, x_axis, extra, ...])

Plots a figure with lines for each production (average with shades for

geneticengine.visualization.per_gen_comparisons.plot_comparison(folder_names, labels, labels_name='Labels', x_axis='Generations', y_axis='Fitness', title='Fitness comparison', file_name=None, normalize_with_first_value=False)

Plots a figure with lines for each folder (average with shades for std) with each folder from folder_names named with the corresponding labels_name.

Parameters:
  • folder_names (list) –

  • labels (list) –

  • labels_name (str) –

  • x_axis (str) –

  • y_axis (str) –

  • title (str) –

geneticengine.visualization.per_gen_comparisons.plot_fitness_comparison(folder_names, labels, labels_name='Labels', x_axis='Generations', y_axis='Fitness', title='Fitness comparison', file_name=None, normalize_with_first_value=False)

Plots a figure with lines for each folder (average with shades for std) with each folder from folder_names named with the corresponding labels_name.

In this case, the fitness is plotted

Parameters:
  • folder_names (list) –

  • labels (list) –

  • labels_name (str) –

  • x_axis (str) –

  • y_axis (str) –

  • title (str) –

geneticengine.visualization.per_gen_comparisons.plot_test_fitness_comparison(folder_names, labels, labels_name='Labels', x_axis='Generations', y_axis='Test fitness', title='Test fitness comparison', file_name=None, normalize_with_first_value=False)

Plots a figure with lines for each folder (average with shades for std) with each folder from folder_names named with the corresponding labels_name.

In this case, the test fitness is plotted

Parameters:
  • folder_names (list) –

  • labels (list) –

  • labels_name (str) –

  • x_axis (str) –

  • y_axis (str) –

  • title (str) –

geneticengine.visualization.per_gen_comparisons.plot_nodes_comparison(folder_names, labels, labels_name='Labels', x_axis='Generations', y_axis='Nodes', title='Nodes comparison', file_name=None, normalize_with_first_value=False)

Plots a figure with lines for each folder (average with shades for std) with each folder from folder_names named with the corresponding labels_name.

In this case, the nodes are plotted

Parameters:
  • folder_names (list) –

  • labels (list) –

  • labels_name (str) –

  • x_axis (str) –

  • y_axis (str) –

  • title (str) –

geneticengine.visualization.per_gen_comparisons.plot_prods_comparison(folder_name, x_axis='Generations', extra='productions', y_axis='Fitness', title='Production comparison', file_name=None, take_out_prods=['str', 'float', 'int'], keep_in_prods=None, normalized_on_nodes=False)

Plots a figure with lines for each production (average with shades for std) in the grammar (you can use take_out_prods and keep_in_prods to take out and keep in prods).

Only a single folder can be given.

Parameters:
  • folder_name (str) –

  • x_axis (str) –

  • extra (str) –

  • y_axis (str) –

  • title (str) –

  • take_out_prods (list) –

  • keep_in_prods (list | None) –

  • normalized_on_nodes (bool) –