matlab2013b
首先参考文献《[1] Mahendran N , Wang Z , Hamze F , et al. Adaptive MCMC with Bayesian Optimization[C]// 2012.》
这个程序是我们的算法的整体上的实现,即论文中的

下面进行介绍和分析:

这个是主要的程序,每一行对应的注释,就是对应的上述的algorithm的各个步骤
这个主函数下对应的如下几个子函数,这几个子函数只需要了解大概的功能就可,具体参数实现过程

1功能: 更新GP的统计参数
2功能: 论文中的说的高斯过程
3功能: 计算

的程序
4功能: 马尔科夫链的程序
5功能: 画出马尔科夫链的图像效果显示。
clc;clear;close all;warning off;addpath 'func\'I     = 10;nsimu = 1e4; npar  = 20;
D     = cell(1,I);for i = 1:I    %Run Markov chain for L steps with parameters θ    
chain = Markov_chain(nsimu,npar);    %Use the drawn samples to obtain a noisy evaluation of the objective 
function: z    noisy_evaluation = randn(size(chain))/100;    Z     = func_h(chain) + noisy_evaluation;    
%Augment the data    D{i}  = [chain;Z];    %Update the GP’s su?cient statistics.    D2{i} = func_GP(D{i});   
 %Find θi+1by optimizing an acquisition function:    thetamax{i} = func_optimizing(D2{i});end figure(1);
 mcmcplot(thetamax{1},[],{'\theta_1'},'chainpanel')1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.
 22.23.24.25.26.27.
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删