# skopt.plots.partial_dependence_2D¶

skopt.plots.partial_dependence_2D(space, model, i, j, samples, n_points=40)[source][source]

Calculate the partial dependence for two dimensions in the search-space.

This uses the given model to calculate the average objective value for all the samples, where the given dimensions are fixed at regular intervals between their bounds.

This shows how the given dimensions affect the objective value when the influence of all other dimensions are averaged out.

Parameters
spaceSpace

The parameter space over which the minimization was performed.

model

Surrogate model for the objective function.

iint

The first dimension for which to calculate the partial dependence.

jint

The second dimension for which to calculate the partial dependence.

samplesnp.array, shape=(n_points, n_dims)

Randomly sampled and transformed points to use when averaging the model function at each of the n_points when using partial dependence.

n_pointsint, default=40

Number of points at which to evaluate the partial dependence along each dimension i and j.

Returns
xinp.array, shape=n_points

The points at which the partial dependence was evaluated.

yinp.array, shape=n_points

The points at which the partial dependence was evaluated.

zinp.array, shape=(n_points, n_points)

The average value of the objective function at each point (xi, yi).