Sequential procedures

Sequential procedures maintain the current data set, update the GP model, make posterior predictions, and select new evaluation points.

SequentialPrediction stores observations, model state, and predictions. The strategy classes add sampling-criterion based decisions.

SequentialPrediction

class SequentialPrediction(model, force_param_initial_guess=True)

Store a ModelContainer and a growing observation set.

set_data(xi, zi)

Store observations. xi has shape (n, d) and zi is reshaped to (n, output_dim).

set_data_with_model_selection(xi, zi)

Store observations, then call model.select_params.

set_new_eval(xnew, znew)

Append one or more observations. xnew can have shape (d,) or (m, d). znew is reshaped to (m, output_dim). Raises ValueError when dimensions do not match the stored data.

set_new_eval_with_model_selection(xnew, znew)

Append observations, then update model parameters.

predict(xt, convert_out=True, use_cache=False)

Predict at xt using stored data. Returns (zpm, zpv) with shape (m, output_dim). Raises ValueError if no data has been set.

compute_conditional_simulations(xt, n_samplepaths=1, type='intersection', method='svd', convert_in=True, convert_out=True)

Forward conditional simulation to the underlying ModelContainer.

Sequential strategies

class SequentialStrategy(problem, model, options=None)

Base class for criteria that select new evaluation points. Subclasses must define set_initial_xt, update_current_estimate, update_search_space, sampling_criterion, and step.

Shared options keys are:

  • update_model_at_init.

  • update_predictions_at_init.

  • update_estimate_at_init.

  • update_search_space_at_init.

  • maximize_criterion.

set_initial_design(xi) evaluates the problem at xi, stores the observations, and optionally updates model parameters, predictions, the estimate, and the search space according to these options.

class SequentialStrategyGridSearch(problem, model, xt, options=None)

Use a fixed candidate set xt with shape (m, d). step evaluates the sampling criterion on xt, selects the best candidate according to maximize_criterion, evaluates the problem there, updates the model, and stores the selected index in history["eval_indices"].

class SequentialStrategySMC(problem, model, options=None)

Use gpmp.mcmc.smc.SMC particles as the candidate set. Additional options include n_smc, initial_distribution_type, and update_method. Subclasses must define the SMC target through smc_log_density and update_smc_target_log_density_param.

class SequentialStrategyBSS(problem, model, options=None)

Use an SMC candidate set for Bayesian subset simulation style updates. Additional options include n_smc and initial_distribution_type.

Sequential Prediction Module

This module implements the SequentialPrediction class, which facilitates sequential predictions with Gaussian process (GP) models. It allows building and storing GP models, managing datasets, appending new evaluations, making predictions, and simulating conditional sample paths.

Classes

SequentialPrediction

A class that encapsulates the functionality for sequential predictions using GP models. It manages datasets, GP models, and performs various operations like updating models, making predictions, and generating conditional sample paths.

Author: Emmanuel Vazquez <emmanuel.vazquez@centralesupelec.fr> Copyright (c) 2022-2026, CentraleSupelec License: GPLv3 (see LICENSE)

Sequential Decision-Making Strategies Module

This module implements sequential decision-making strategies. It defines a base class, SequentialStrategy, that handles evaluations, model updates, and sampling criterion computations. Derived classes implement specific strategies: - SequentialStrategyGridSearch: uses a fixed candidate set for grid search. - SequentialStrategySMC: adapts the search space using Sequential Monte Carlo (SMC). - SequentialStrategyBSS: adapts the search space via Bayesian Subset Simulation (BSS) principles.

Authors: Emmanuel Vazquez <emmanuel.vazquez@centralesupelec.fr> Copyright (c) 2023-2025, CentraleSupelec License: GPLv3 (see LICENSE)

class gpmpcontrib.sequentialstrategy.SequentialStrategy(problem, model, options=None)[source]

Bases: SequentialPrediction

Sequential decision-making via a sampling criterion.

This abstract class extends SequentialPrediction to incorporate a sampling criterion for sequential decision-making. It selects new points based on the criterion and updates the predictive model accordingly.

Parameters:
  • problem (object) – Problem instance with the objective function.

  • model (object) – Predictive model.

  • options (dict, optional) –

    Strategy configuration. Options may include:

    maximize_criterion : bool, default True. update_model_at_init : bool, default True. update_estimate_at_init : bool, default True. update_search_space_at_init : bool, default False.

computer_experiments_problem

Problem instance.

Type:

object

options

Strategy options.

Type:

dict

nt

Number of candidates / search points.

Type:

int

xt

Candidate points.

Type:

ndarray

zpm, zpv

Posterior mean and variance on candidate points.

Type:

ndarray or None

current_estimate

Current best estimate.

Type:

None

sampling_criterion_values

Sampling criterion values.

Type:

array_like

n_iter

Iteration counter.

Type:

int

exec_times

Timing metrics.

Type:

dict

history
Evaluation history with keys:
  • “estimates”: recorded estimates,

  • “criterion_best”: best criterion value per iteration,

  • “model_params”: snapshots of model parameters.

Type:

dict

maximize_criterion

If True, the criterion is maximized. If False, it is minimized.

Type:

bool

get_model_params()[source]

Return a snapshot of model parameters from the ModelContainer.

get_model_state()[source]

Return the pickleable model state.

class gpmpcontrib.sequentialstrategy.SequentialStrategyBSS(problem, model, options=None)[source]

Bases: SequentialStrategy

Sequential strategy using Bayesian Subset Simulation (BSS) for search space adaptation.

This extends SequentialStrategy by incorporating a Sequential Monte Carlo (SMC) sampler to refine the search space based on Bayesian Subset Simulation principles.

Parameters:
  • problem (object) – The optimization problem.

  • model (object) – Predictive model (e.g., Gaussian process).

  • options (dict, optional) –

    Strategy configuration:
    • n_smc (int, default 1000): Number of SMC particles.

    • initial_distribution_type (str, default “randunif”): Initial particle distribution.

    • update_model_at_init (bool, default True): Update model at initialization.

    • update_predictions_at_init (bool, default True): Update predictions at initialization.

    • update_estimate_at_init (bool, default True): Update estimate at initialization.

    • update_search_space_at_init (bool, default True): Update search space at initialization.

smc

SMC sampler used for search space adaptation.

Type:

SMC

smc_log_density_param

Current parameter for the SMC target density.

Type:

any

init_smc(box, n_smc, initial_distribution_type)[source]

Initialize the SMC instance using the problem’s input box.

Notes

At initialization, particles are distributed according to the initial distribution

update_search_space()[source]

Update the SMC search space using the specified method.

class gpmpcontrib.sequentialstrategy.SequentialStrategyGridSearch(problem, model, xt, options=None)[source]

Bases: SequentialStrategy

Sequential strategy using a fixed candidate set / point collection (PC).

Parameters:
  • problem (object) – Problem instance.

  • model (object) – Predictive model.

  • xt (array_like) – Fixed candidate points.

  • options (dict, optional) –

    Additional options. Defaults for PC:

    update_model_at_init = True, update_estimate_at_init = True, update_search_space_at_init = False.

class gpmpcontrib.sequentialstrategy.SequentialStrategySMC(problem, model, options=None)[source]

Bases: SequentialStrategy

Sequential strategy using SMC to adapt the search space.

This class augments the base strategy with SMC functionalities. It updates the search space using an SMC sampler.

Parameters:
  • problem (object) – Problem instance.

  • model (object) – Predictive model.

  • options (dict, optional) –

    Strategy configuration. Options for SMC default to:

    n_smc = 1000, update_model_at_init = True, update_estimate_at_init = True, update_search_space_at_init = True.

smc

SMC instance for adapting the search space.

Type:

SMC

smc_log_density_param_initial

Initial parameter for SMC target density.

Type:

any

smc_log_density_param

Current parameter for SMC target density.

Type:

any

init_smc(box, n_smc, initial_distribution_type)[source]

Initialize the SMC instance using the problem’s input box.

Notes

At initialization, particles are distributed according to the initial distribution

update_search_space()[source]

Update the SMC search space using the specified method.