coexist.plots.access#

coexist.plots.access(access_data, select=<function <lambda>>, epochs=Ellipsis, colors=['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)', 'rgb(255,255,51)', 'rgb(166,86,40)', 'rgb(247,129,191)', 'rgb(153,153,153)'], overall=False, means=True, confidence=True)[source]#

Create a Plotly figure showing the solutions tried, uncertainties and error values found in a coexist.Access run.

Parameters:
access_datacoexist.AccessData or str

An AccessData object containing all information about an ACCES run; you can initialise it with coexist.AccessData.read("folder_path"). Alternatively, supply the folder_path directly.

selectfunction, default lambda results: results[:, -1] < numpy.inf

A filtering function used to plot only selected solutions tried, based on an input 2D table results, with columns formatted as [param1, param2, …, param1_std, param2_std, …, overall_std, error_value]. E.g. to only plot solutions with an error value smaller than 100: select = lambda results: results[:, -1] < 100.

epochsint or iterable or Ellipsis, default Ellipsis

The index or indices of the epochs to plot. An int signifies a single epoch, an iterable (list-like) signifies multiple epochs, while an Ellipsis () signifies all epochs.

colorslist[str], default plotly.express.colors.qualitative.Set1

A list of colors used for each parameter plotted.

overallbool, default False

If True, also plot the overall standard deviation progression; note that sometimes all parameters converge but the overall std-dev remains high.

meansbool, default True

If True, also plot the centre of the region explored by CMA-ES.

confidencebool, default True

If True, also plot the standard deviation of each parameter as confidence intervals.

Returns:
plotly.graph_objs.Figure

A Plotly figure containing subplots with the solutions tried. Call the .show() method to display it.

Examples

If coexist.Access(filepath, random_seed = 12345) was run, the directory “access_seed12345” would have been created. Plot its results:

>>> import coexist
>>> data = coexist.AccessData.read("access_seed12345")
>>> fig = coexist.plots.access(data)
>>> fig.show()

Or more tersely:

>>> import coexist
>>> coexist.plots.access("access_seed12345").show()

Only plot solution combinations that yielded an error value < 100:

>>> coexist.plots.access(
>>>      data,
>>>      select = lambda results: results[:, -1] < 100,
>>> ).show()