0001
0002
0003
0004
0005
0006
0007 clear edaparams;
0008 PopSize = 1000; n = 50; cache = [1,1,1,1,1]; Card = 2*ones(1,n); MaxGen = 30;
0009 global FunctionTables;
0010 global FunctionStructure;
0011 global FunctionAccCard;
0012 global SelectedObjectives;
0013
0014 [FunctionStructure] = CreateListFactorsCircularNK(n,4);
0015 [FunctionTables] = ReadFunctionsFromData('testNK_fnt_N50_k4Inst_1.txt',FunctionStructure,Card);
0016 [FunctionAccCard] = FindListCard(FunctionStructure,Card);
0017 SelectedObjectives = [1:4:48];
0018
0019 F = 'PartialEvaluateGeneralFunction';
0020 selparams(1:2) = {0.5,'ParetoRank_ordering'};
0021 edaparams{1} = {'selection_method','truncation_selection',selparams};
0022 edaparams{2} = {'replacement_method','best_elitism',{'ParetoRank_ordering'}};
0023 edaparams{3} = {'stop_cond_method','max_gen',{MaxGen}};
0024
0025
0026
0027 [AllStat,Cache]=RunEDA(PopSize,n,F,Card,cache,edaparams);
0028
0029
0030
0031
0032 AllSols = []; AllVals = [];
0033 for i=1:MaxGen,
0034 AllSols = [AllSols;Cache{1,i}];
0035 AllVals = [AllVals;Cache{4,i}];
0036 end
0037
0038 Index = FindParetoSet(AllSols,AllVals);
0039 ParetoPop = AllSols(Index,:);
0040 ParetoVals = AllVals(Index,:);
0041
0042 parallelcoords(ParetoVals);
0043 ObjectivesCorr = corr(ParetoVals);
0044 [idx,netsim,dpsim,expref]=apcluster(ObjectivesCorr,mean(ObjectivesCorr));
0045
0046
0047
0048 for i=1:MaxGen,
0049 bnet = Cache{3,i};
0050 All_BN_Fit_Corr(i,:) = BN_Fitness_Corr(bnet,ParetoPop,ParetoVals)
0051 end
0052