Home > Mateda2.0 > knowledge_extraction > visualization > ViewGlyphStruct.m

ViewGlyphStruct

PURPOSE ^

[results] = ViewGlyphStruct(run_structures,viewparams)

SYNOPSIS ^

function[results] = ViewGlyphStruct(run_structures,viewparams)

DESCRIPTION ^

 [results] = ViewGlyphStruct(run_structures,viewparams)
                       
 'ViewGlyphStruct'    :Shows the glyph representation of a subset of edges learned
                       at a given set of runs and generations

 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.
 viewparams{1} = fs; % fs: Font size for the images
 viewparams{2}:  List of edges, one row for each edge
 viewparams{3}:  % Vector with the selected runs  that will be inspected
 viewparams{4};  % Vector of the selected generations  that will be inspected
 OUTPUT
 results{1}: Matrix containing one vector for each of the substructures
 shown with the glyphs

 Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function[results] = ViewGlyphStruct(run_structures,viewparams)
0002 % [results] = ViewGlyphStruct(run_structures,viewparams)
0003 %
0004 % 'ViewGlyphStruct'    :Shows the glyph representation of a subset of edges learned
0005 %                       at a given set of runs and generations
0006 %
0007 % INPUT
0008 % run_structures: Contain the data structures with all the structures
0009 % learned by the probability models in every run and generation (see
0010 % program ReadStructures.m for details.
0011 % viewparams{1} = fs; % fs: Font size for the images
0012 % viewparams{2}:  List of edges, one row for each edge
0013 % viewparams{3}:  % Vector with the selected runs  that will be inspected
0014 % viewparams{4};  % Vector of the selected generations  that will be inspected
0015 % OUTPUT
0016 % results{1}: Matrix containing one vector for each of the substructures
0017 % shown with the glyphs
0018 %
0019 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
0020 
0021  
0022 
0023 indexmatrix = run_structures{1};
0024 AllBigMatrices = run_structures{2};
0025 
0026 fs = viewparams{1};      % Fontsize for the figures
0027 
0028 substruct = viewparams{2};
0029 selected_runs = viewparams{3};
0030 generations = viewparams{4};
0031 
0032 
0033 n = size(indexmatrix,1);
0034 AuxSumContactMatrix = zeros(n,n);
0035 results  = [];
0036 
0037 nconds = size(substruct,1);  % Number of edges
0038 for i=1:nconds
0039  indexconds(i) = indexmatrix(substruct(i,1),substruct(i,2));    % Indices of the edges in indexmatrix
0040 end
0041 
0042 VectorGlyphs = [];
0043 for j=1:size(selected_runs,2)
0044     the_run = AllBigMatrices{selected_runs(j)};  
0045     for i=1:size(generations,2)            % Only generations specified in viewparams{3}
0046       one_gen = the_run(:,generations(i)); % Edges learned at that generation
0047       VectorGlyphs = [VectorGlyphs;one_gen(indexconds)'];
0048     end
0049 end
0050   
0051 figure  
0052 axes('Fontsize',fs);
0053 glyphplot(VectorGlyphs,'Grid',[size(selected_runs,2),size(generations,2)],'ObsLabels','')
0054 
0055 results{1} = VectorGlyphs;
0056 
0057 
0058 
0059 
0060 
0061

Generated on Fri 04-Dec-2009 13:38:29 by m2html © 2003