fitbenchmarking.core.results_output module

Functions that create the tables, support pages, figures, and indexes.

fitbenchmarking.core.results_output.create_directories(options, group_name)

Create the directory structure ready to store the results


paths to the top level group results, support pages, and figures directories

Return type

(str, str, str)

fitbenchmarking.core.results_output.create_index_page(options: Options, groups: list[str], result_directories: list[str]) str

Creates the results index page for the benchmark, and copies the fonts and js directories to the correct location.

  • options (fitbenchmarking.utils.options.Options) – The user options for the benchmark.

  • groups (A list of strings.) – Names for each of the problem set groups.

  • result_directories – Result directory paths for each

problem set group. :type result_directories: A list of strings. :return: The filepath of the results_index.html file. :rtype: str

fitbenchmarking.core.results_output.create_plots(options, results, best_results, figures_dir)

Create a plot for each result and store in the figures directory

  • options (fitbenchmarking.utils.options.Options) – The options used in the fitting problem and plotting

  • results (list of list of fitbenchmarking.utils.fitbm_result.FittingResult) – results nested array of objects

  • best_results (list[dict[str: fitbenchmarking.utils.fitbm_result.FittingResult]]) – best result for each problem seperated by cost function

  • figures_dir (str) – Path to directory to store the figures in

fitbenchmarking.core.results_output.create_problem_level_index(options, table_names, group_name, group_dir, table_descriptions)

Generates problem level index page.

  • options (fitbenchmarking.utils.options.Options) – The options used in the fitting problem and plotting

  • table_names (list) – list of table names

  • group_name (str) – name of the problem group

  • group_dir (str) – Path to the directory where the index should be stored

  • table_descriptions (dict) – dictionary containing descriptions of the tables and the comparison mode

fitbenchmarking.core.results_output.open_browser(output_file: str, options) None

Opens a browser window to show the results of a fit benchmark.


output_file (str) – The absolute path to the results index file.

fitbenchmarking.core.results_output.preprocess_data(results: list[FittingResult])

Generate a dictionary of results lists sorted into the correct order with rows and columns as the key and list elements respectively.

This is used to create HTML and txt tables. This is stored in self.sorted_results


results (list[fitbenchmarking.utils.fitbm_result.FittingResult]) – The results to process


The best result grouped by row and category (cost function), The sorted results grouped by row and category

Return type

dict[str, dict[str, utils.fitbm_result.FittingResult]], dict[str, dict[str, list[utils.fitbm_result.FittingResult]]]

fitbenchmarking.core.results_output.save_results(options, results, group_name, failed_problems, unselected_minimizers)

Create all results files and store them. Result files are plots, support pages, tables, and index pages.

Params unselected_minimizers

Dictionary containing unselected minimizers based on the algorithm_type option


Path to directory of group results

Return type