[AllRepVectors] = ExtractSubstructures(run_structures,RepEdges,NumbRep) ExtractSubstructures: From the set of all the structures learned in all runs, extracts those substructures corresponding to the edges passed in viewparams{1}. One substructure is extracted if it contains at least viewparams{2}>0 edges. INPUT run_structures: Contain the data structures with all the structures learned by the probability models in every run and generation (see program ReadStructures.m for details. RepEdges: Indices of the edges that will be extracted NumbRep: Minimal number of edges (of those in viewparams{1}) that have to be in the structure to extracted. OUTPUT AllRepVectors: Subset of structures selected for visualization Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
0001 function[AllRepVectors] = ExtractSubstructures(run_structures,RepEdges,NumbRep) 0002 % [AllRepVectors] = ExtractSubstructures(run_structures,RepEdges,NumbRep) 0003 % ExtractSubstructures: From the set of all the structures learned in all 0004 % runs, extracts those substructures corresponding to 0005 % the edges passed in viewparams{1}. 0006 % One substructure is extracted if it contains at least 0007 % viewparams{2}>0 edges. 0008 % INPUT 0009 % run_structures: Contain the data structures with all the structures 0010 % learned by the probability models in every run and generation (see 0011 % program ReadStructures.m for details. 0012 % RepEdges: Indices of the edges that will be extracted 0013 % NumbRep: Minimal number of edges (of those in viewparams{1}) that have 0014 % to be in the structure to extracted. 0015 % OUTPUT 0016 % AllRepVectors: Subset of structures selected for visualization 0017 % 0018 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es) 0019 0020 0021 AllBigMatrices = run_structures{2}; 0022 0023 nruns = size(AllBigMatrices,2); 0024 maxgen = size(AllBigMatrices{1},2); 0025 0026 AllRepVectors = []; 0027 0028 for i=1:nruns, 0029 for j=1:maxgen, 0030 AuxVector = [AllBigMatrices{i}(RepEdges,j)]; 0031 if sum(AuxVector)> NumbRep 0032 AllRepVectors = [AllRepVectors;[j*AuxVector]']; 0033 end 0034 end, 0035 end, 0036 0037