visumod.plots module

This module provides the actual plots.

visumod.plots.adaptive_candidates(candidates, data, iteration)

Plot the adapative sampling candidate points.

Parameters:
  • candidates (np.array) – Candidate samples.
  • data (np.array) – Combined adaptive sampling metric.
  • iteration (int) – Iteration number.
visumod.plots.curve(data, name, labels, units, lower_bound=False)

A curve plot.

Parameters:
  • data (np.array) – Data to plot.
  • name (str) – Filename.
  • labels (list) – Axis labels.
  • units (list) – Units of plotted quantities.
  • lower_bound (bool) – Whether to put a lower plot bound at 0.
visumod.plots.get_blackblue_cmap()

Get a custom black-blue colormap.

Returns:Defined colormap.
Return type:newmap (matplotlib.colors.LinearSegmentedColormap)
visumod.plots.get_plot_args(data, label)

Get plot arguments.

Parameters:
  • data (np.array) – Data to plot.
  • label (str) – Variable name for label.
Returns:

Plot arguments.

Return type:

plot_args (dict)

visumod.plots.heatmap(correlation)

A heatmap plot.

Parameters:correlation (np.array) – Correlation matrix.
visumod.plots.learning_curves(training_loss, validation_loss, data_train, prediction_train, data_test, prediction_test, progress)

A 2-figure plot of learning curves and plot correlations.

Parameters:
  • training_loss (list) – Loss history on the training data.
  • validation_loss (list) – Loss history on the testing data.
  • () (prediction_test) – Training output data.
  • () – Training output prediction.
  • () – Testing output data.
  • () – Testing output prediction.
  • progress (list) – Training progress status.
visumod.plots.pareto_fronts(pf_true, pf_calc)

A scatter plot of Pareto fronts comparison.

Parameters:
  • pf_true (np.array) – True Pareto front.
  • pf_calc (np.array) – Calculated Pareto front.
visumod.plots.pcp(data, name)

A parallel component plot.

Parameters:
  • data (np.array) – Data to plot.
  • name (str) – Filename.
visumod.plots.save_figure(name, plot=None, iteration=None)

Save the given figure.

Parameters:
  • name (str) – Filename.
  • () (plot) – Pymoo plot obejct.
  • iteration (int) – Iteration number.
visumod.plots.scatter(data, name, lower_bound=False, compare=False)

A scatter plot.

Parameters:
  • data (np.array) – Data to plot.
  • name (str) – Filename.
  • lower_bound (bool) – Whether to put a lower plot bound at 0.
  • compare (bool) – Whetther this is a surrogate comparison plot.
visumod.plots.scatter_pymoo(data, name, label=None, **kwargs)

Plot either a scatter, curve or surface plot.

Parameters:
  • data (np.array) – Data to plot.
  • name (str) – Visualization type.
  • label (str) – Variable name for label.

Notes

Surface plot not used.

visumod.plots.surface_pymoo(data, iteration)

A surface plot using Pymoo.

Parameters:
  • data (np.array) – Data to plot.
  • iteration (int) – Iteration number.