EXAMPLE 10: Bayesian tree EDA for the Ising Model using MPE-sampling (i.e. the most probable individual from the net is added to the population during sampling). The algorithm stops when the optimum is found or the max number of generations is reached
0001 % EXAMPLE 10: 0002 % Bayesian tree EDA for the Ising Model using MPE-sampling (i.e. 0003 % the most probable individual from the net is added to the population 0004 % during sampling). The algorithm stops when the optimum is found or the 0005 % max number of generations is reached 0006 0007 global Isinglattice; 0008 global Isinginter; 0009 PopSize = 500; n = 64; cache = [0,0,0,0,0]; Card = 2*ones(1,n); 0010 F = 'EvalIsing'; MaxGen = 150; MaxVal = 86; 0011 [Isinglattice, Isinginter] = LoadIsing(n, 1); 0012 stop_cond_params = {MaxGen,MaxVal}; 0013 edaparams{1} = {'stop_cond_method','maxgen_maxval',stop_cond_params}; 0014 edaparams{2} = {'sampling_method',' SampleMPE_BN',{PopSize}}; 0015 [AllStat,Cache]=RunEDA(PopSize,n,F,Card,cache,edaparams); 0016