Closed uremes closed 6 months ago
addressed the feedback that users may not want the prior to be used in sampler initialisation. default option is now to use the uniform distribution, and the user needs to set init_from_prior=True
to sample from the prior instead.
Summary:
The randmaxvar acquisitions are sampled from the maxvar acquisition function with an MCMC sampler. Two updates are proposed here:
The acquisition method needs to initialise the MCMC sampler with a point that has maxvar acquisition score (approximate posterior variance) above zero. The current version samples candidate points from a uniform distribution within BOLFI bounds. The updated version includes an option to sample from the prior distribution.
The current implementation runs one MCMC chain and returns the
batch_size
last samples. This works whenbatch_size=1
but does not provide a representative sample from the maxvar acquisition function otherwise. The version proposed in this update returns the last mcmc sample whenbatch_size=1
and a random sample from the MCMC chain otherwise.For illustration, here are batches acquired by running BOLFI on the MA2 example with log-discrepancies using
batch_size=10
and the current randmaxvar implementation withsampler=’metropolis’
andn_samples=2000
. The batches tend to include 2-4 unique parameter values:These are batches acquired by running the same example using the updated implementation with the same parameters as above and
warmup=500
. Most batches now include 10 unique parameter values:Please make sure
If your contribution adds, removes or somehow changes the functional behavior of the package, please check that
make lint
,make docs
andmake test
and the proposed changes pass all unit tests (check step 6 of CONTRIBUTING.rst for details)
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: