Creating UMDA for OneMax.
0001 % Creating UMDA for OneMax. 0002 0003 PopSize = 300; 0004 n = 30; % Number of variables 0005 cache = [0,0,1,0,0]; % Save probabilistic models 0006 Card = 2*ones(1,n); 0007 maxgen = 10; 0008 F = 'sum';% Onemax function; 0009 0010 % In order to achieve the desired factorization we use a junction tree. With 0 as parameter we have not overlappings. Therefore, the cliques have a unique variable and they are independent. 0011 Cliques = CreateMarkovModel(n, 0); 0012 edaparams{1} = {'learning_method','LearnFDA',{Cliques}}; 0013 edaparams{2} = {'sampling_method','SampleFDA',{PopSize}}; 0014 edaparams{3} = {'stop_cond_method','max_gen',{maxgen}}; 0015 % Launch EDA 0016 [AllStat,Cache]=RunEDA(PopSize, n, F, Card, cache, edaparams)