Visualize¶
pypesto comes with various visualization routines. To use these, import pypesto.visualize.
-
pypesto.visualize.
waterfall
(result, ax=None)¶ Plot waterfall plot.
Parameters: - result (pypesto.Result) – Optimization result obtained by ‘optimize.py’
- ax (matplotlib.Axes, optional) – Axes object to use.
Returns: ax – The plot axes.
Return type: matplotlib.Axes
-
pypesto.visualize.
waterfall_lowlevel
(fvals, ax=None)¶ Plot waterfall plot using list of function values.
Parameters: - fvals (numeric list or array) – Including values need to be plotted.
- ax (matplotlib.Axes, optional) – Axes object to use.
Returns: ax – The plot axes.
Return type: matplotlib.Axes
-
pypesto.visualize.
assign_clusters
(vals)¶ Find clustering.
Parameters: vals (numeric list or array) – List to be clustered. Returns: - clust (numeric list) – Indicating the corresponding cluster of each element from ‘vals’.
- clustsize (numeric list) – Size of clusters, length equals number of clusters.
- ind_clust (numeric list) – Indices to reconstruct ‘clust’ from a list with 1:number of clusters.
-
pypesto.visualize.
assign_clustered_colors
(vals)¶ Cluster and assign colors.
Parameters: vals (numeric list or array) – List to be clustered and assigned colors. Returns: Col – One for each element in ‘vals’. Return type: list of RGB
-
pypesto.visualize.
parameters
(result, ax=None)¶ Plot parameter values.
Parameters: - result (pypesto.Result) – Optimization result obtained by ‘optimize.py’.
- ax (matplotlib.Axes, optional) – Axes object to use.
Returns: ax – The plot axes.
Return type: matplotlib.Axes
-
pypesto.visualize.
parameters_lowlevel
(xs, fvals, lb=None, ub=None, x_labels=None, ax=None)¶ Plot parameters plot using list of parameters.
Parameters: - xs (nested list or array) – Including optimized parameters for each startpoint. Shape: (n_starts, dim).
- fvals (numeric list or array) – Function values. Needed to assign cluster colors.
- ub (lb,) – The lower and upper bounds.
- x_labels (array_like of str, optional) – Labels to be used for the parameters.
- ax (matplotlib.Axes, optional) – Axes object to use.
Returns: ax – The plot axes.
Return type: matplotlib.Axes