active_sample

Contents

active_sample#

pyvbmc.vbmc.active_sample(gp: GP, sample_count: int, optim_state: dict, function_logger: FunctionLogger, iteration_history: IterationHistory, vp: VariationalPosterior, options: Options)[source]#

Actively sample points iteratively based on acquisition function.

Parameters:
gpgpyreg.GP or None

The GaussianProcess from the VBMC instance this function is called from. None runs the initial design instead of the acquisition: the starting points and, where they fall short of sample_count, points drawn in the plausible box.

sample_countint

The number of samples.

optim_statedict

The optim_state from the VBMC instance this function is called from.

function_loggerFunctionLogger

The FunctionLogger from the VBMC instance this function is called from.

iteration_historyIterationHistory

The IterationHistory from the VBMC instance this function is called from.

vpVariationalPosterior

The VariationalPosterior from the VBMC instance this function is called from.

optionsOptions

Options from the VBMC instance this function is called from.

Returns:
function_loggerFunctionLogger

The updated FunctionLogger.

optim_statedict

The updated optim_state.

vpVariationalPosterior

The updated VP.

gpgpyreg.GP or None

The updated GP; None after the initial design.

Notes

Random draws (initial design, acquisition choice, search points, CMA-ES) use vp.rng.