plot_slice#

AxModelManager.plot_slice(param_name=None, metric_name=None, slice_values='mid', n_points=200, range=None, show_legend=False, subplot_spec=None, gridspec_kw=None, plot_kw=None, **figure_kw)#

Plot a 1D slice of the surrogate model.

Parameters:
param_namestr

Name of the parameter to plot in x axis. If not given, the first varying parameter will be used.

metric_namestr, optional.

Name of the metric to plot. If not specified, it will take the first objective in self.ax_client.

slice_valuesdict or str, optional.

The values along which to slice the model, if the model has more than one dimensions. Possible values are: "best" (slice along the best predicted point), "mid" (slice along the middle point of the varying parameters), or a dictionary with structure {param_name: param_val} that contains the slice values of each parameter. By default, "mid".

n_pointsint, optional

Number of points along the x axis. By default, 200.

rangelist of float, optional

Range of the x axis. It not given, the lower and upper boundary of the x parameter will be used.

show_legendbool

Whether to show a legend with the fixed slice values. By default, False.

subplot_specSubplotSpec, optional

A matplotlib SubplotSpec in which to draw the axis.

gridspec_kwdict, optional

Dict with keywords passed to the GridSpec.

plot_kwdict, optional

Dict with keywords passed to ax.plot.

**figure_kw

Additional keyword arguments to pass to pyplot.figure. Only used if no subplot_spec is given.

Returns:
Figure, Axes