MCMC hyperparameter marginalization
javdrher opened this issue · comments
Rather than only relying on point-estimates for the hyperparameters, we should include the ability to average the acquisition scores over several draws from the log likelihood + log prior. This should not be too hard to accomplish given the support to sum acquisitions, and the MCMC support built in GPflow. What I had in mind:
- Include an option for BayesianOptimizer to indicate the number of draws (n)
- Copy the acquisition n times and sum them all together. This sum acquisition will then be optimized to select new sampling decisions
- Each iteration, request all models of one of original acquisition object. Call sample on each model to obtain n draws. Then visit each acquisition of the sum and call
set_state()
on the models.
These steps only require limited changes in BayesianOptimizer. Two issues currently prevent implementation
- When copying an acquisition object (and its underlying models) the order of
sorted_params
can change. This means callingset_state()
with a free state vector obtained from another copy can have the wrong order. GPflow/GPflow#417 would solve this if merged - Right now, ei + ei + ei results in a tree structure, it would simpler if it results in some form of AggregateAcquisition which concatenates the scores and applies
tf.reduce_sum
. This would reduce the size of the tree and the TensorFlow graph, and is more efficient (I guess). This would require some additional code: I'm playing around with this right now and it seems to be straightforward.
Both issues were addressed, started working on this.
#31 implements the MCMC hyperparameter marginalization.