skopt.plots.partial_dependence_1D

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

Calculate the partial dependence for a single dimension.

This uses the given model to calculate the average objective value for all the samples, where the given dimension is fixed at regular intervals between its bounds.

This shows how the given dimension affects 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 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.

Returns
xinp.array

The points at which the partial dependence was evaluated.

yinp.array

The average value of the modelled objective function at each point xi.