qual_heatmap

Function qual_heatmap can help you visualize the performance of all configurations on selected instances. You must provide data in CraceResults format and the source of data (training or testing) you select for plotting.

To check more details for its available arguments, call:

import craceplot as cplot

help(cplot.qual_heatmap)
Help on function qual_heatmap in module craceplot.plots.quality:

qual_heatmap(data: 'CraceResults' = None, options: 'CplotOptions' = None, select: 'list' = None, slice: "Union[Literal['budget', 'b', 'B', 'e', 'E', 'experiment', 'time', 't', 'T'], bool, None]" = None, out_dir: 'str' = None, file_name: 'str' = None, title: 'str' = None, num: "Literal['all', 'final', 'elites', None]" = None, source: "Literal['training', 'test', 'testing', None]" = None, _console: 'bool' = True, showfliers: 'bool' = False, showmeans: 'bool' = False, stest: 'bool' = False, dpi: 'int' = 800, fontsize: 'int' = 12, fliersize: 'float' = 0.5, colorscale: 'str' = 'Viridis', as_html: 'bool' = False)
    Entrance to call quality heatmap in python console
    
    :param data: Object CraceResults that must be provided.
    :param options: Object CplotOptions that must be provided.
    :param select: A list of instance names or identifiers selected for plotting.
    :param slice: Optional. Specifies how the quality data are sliced before plotting. Supported values are 'budget'/'b'/'B', 'experiment'/'e'/'E', 'time'/'t'/'T', or a boolean value.
    :param out_dir: Output directory for saving the generated figure.
    :param file_name: File name of the generated figure.
    :param title: Title of the heatmap.
    :param num: Optional. Specifies the configurations included in the heatmap. Supported values are 'all', 'final', and 'elites'.
    :param source: Optional. Specifies the source of the quality data. Supported values are 'training' and 'test'/'testing'.
    :param showfliers: Boolean used to enable/disable showing outliers.
    :param showmeans: Boolean used to enable/disable showing mean values.
    :param stest: Boolean used to enable/disable statistical testing.
    :param dpi: Resolution of the generated figure in dots per inch.
    :param fontsize: Font size used in the heatmap.
    :param fliersize: Size of the outlier markers.
    :param colorscale: A string of palette name used for plotting.

Take ACOTSP and CATS200 for example:

import os
from pathlib import Path

cplot_home = cplot.where()

p = Path(os.path.join(cplot_home, 'inst', 'examples', 'acotsp'))
path_to_acotsp = os.path.relpath(p, Path.cwd())

p = Path(os.path.join(cplot_home, 'inst', 'examples', 'cats200'))
path_to_cats200 = os.path.relpath(p, Path.cwd())

results1, options1 = cplot.run('-l', path_to_acotsp)
results2, options2 = cplot.run('-l', path_to_cats200)
/opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/site-packages/craceplot
#---------------------------------------------------------------------------------------------------
# Reading crace plot options...
# Arguments: ['-l', '../../../../../../../../opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/site-packages/craceplot/inst/examples/acotsp']
#
# Loading crace plot options...
#---------------------------------------------------------------------------------------------------
# Reading crace plot options...
# Arguments: ['-l', '../../../../../../../../opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/site-packages/craceplot/inst/examples/cats200']
#
# Loading crace plot options...
cplot.qual_heatmap(data=results1, options=options1, source='training', as_html=True)
cplot.qual_heatmap(data=results2, options=options2, source='training', as_html=True)