-
Notifications
You must be signed in to change notification settings - Fork 26
Plot Pareto
scripts/plot_dse.py is a script to compare different explorations using Pareto fronts.
The input to the script is:
- a json file containing the parameters of the exploration. Only the following fields are necessary in the json:
-
"optimization_objectives".
-
"feasible_output".
This fields are optional:
-
"output_pareto_file", if not defined the default is: output_pareto_file.csv.
-
"output_data_file", if not defined the default is: output_data_file.csv.
-
"image_xlog", if you want log scale on the x axis.
-
"image_ylog", if you want log scale on the y axis.
-
"optimization_objectives_labels_image_pdf", default is ["x", "y"].
-
"output_image_pdf_file": this is the output of this script, default is: output_image.pdf.
-
"run_directory": default is: ".".
- a list of pairs of files each pair containing one Pareto file and the corresponding exploration result file.
Example 1:
python3 scripts/plot_dse.py example_scenarios/synthetic/chakong_haimes/chakong_haimes_scenario.json
This will plot an image with the only Pareto file and exploration result file that are present in the json file, i.e. fields "output_pareto_file" and "output_data_file". If not other file is added in the command line the Pareto plot will only show one Pareto and no comparison with other results.
The image pdf file will be saved in the HYPERMAPPER_HOME/"run_directory"/ if a relative path is declared in the json files or at the absolute path otherwise. It will contain a picture like this one that cuts the visualization to the valid part of the space. The full exploration is also visualized in another file.
Example 2:
python3 scripts/plot_dse.py example_scenarios/synthetic/chakong_haimes/chakong_haimes_scenario.json output_image_file.pdf file1_pareto file1_search file2_pareto file2_search file3_pareto file3_search
Here, by specifying the files in the command line we by-pass the file names in the json file. The output image pdf file will contain the plot and the pairs (file1_pareto, file1_search) and (file2_pareto, file2_search) and (file3_pareto, file3_search) will be visualized for comparison purposes.