Skip to main content
`Ctrl`+`K`

# `skopt.plots`.plot_evaluations

skopt.plots.plot_evaluations(result, bins=20, dimensions=None, plot_dims=None, size=2, wspace=0.35, hspace=0.35, cmap='viridis', ax=None)

  Visualize the order in which points were sampled during optimization.

  This creates a 2-d matrix plot where the diagonal plots are histograms that show the distribution of samples for each search-space dimension.

  The plots below the diagonal are scatter-plots of the samples for all combinations of search-space dimensions.

  The order in which samples were evaluated is encoded in each point’s color.

  A red star shows the best found parameters.

  Parameters:
    result `OptimizeResult`

      The optimization results from calling e.g. `gp_minimize()`.

    bins int, bins=20

      Number of bins to use for histograms on the diagonal.

    dimensions list of str, default=None

      Labels of the dimension variables. `None` defaults to `space.dimensions[i].name`, or if also `None` to `['X_0', 'X_1', ..]`.

    plot_dims list of str and int, default=None

      List of dimension names or dimension indices from the search-space dimensions to be included in the plot. If `None` then use all dimensions except constant ones from the search-space.

    size float, default=2

      Height (in inches) of each facet.

    wspace float, default=0.35

      The width of the padding between subplots, as a fraction of the average Axes width. Ignored if `ax` is provided.

    hspace float, default=0.35

      The height of the padding between subplots, as a fraction of the average Axes height. Ignored if `ax` is provided.

    size float, default=2

      Height (in inches) of each facet.

    cmap: str or Colormap, default = ‘viridis’

      Color map for scatter plots. Passed directly to `plt.scatter()`

    ax: `Matplotlib.Axes`, default= None

      An axis object in which to plot the dependence plot.

  Returns:
    ax `Matplotlib.Axes`

      Matplotlib axis the plto was drawn in