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

# ViewInGenStruct

## PURPOSE

[results] = ViewInGenStruct(run_structures,viewparams)

## SYNOPSIS

function[results] = ViewInGenStruct(run_structures,viewparams)

## DESCRIPTION

     [results] = ViewInGenStruct(run_structures,viewparams)
     ViewInGenStruct:      Shows images where each edge has a color
                           proportional (relative to nruns)  to the times it has been present in the structures
                           learned in those generations included in viewparams{2}.
                           There is one figure for each generation.
     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} = [pcolors,fs]; % pcolors: range of colors for the  images. fs: Font size for the images
     viewparams{2} : Vector with the generations to inspect. For showing all the generations, set viewparams{2}=[1:ngen].

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

## CROSS-REFERENCE INFORMATION

This function calls:

- ShowImage [] = ShowImage(pcolors,fs,matrix)

This function is called by:

## SOURCE CODE

    0001 function[results] = ViewInGenStruct(run_structures,viewparams)
    0002 % [results] = ViewInGenStruct(run_structures,viewparams)
    0003 % ViewInGenStruct:      Shows images where each edge has a color
    0004 %                       proportional (relative to nruns)  to the times it has been present in the structures
    0005 %                       learned in those generations included in viewparams{2}.
    0006 %                       There is one figure for each generation.
    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} = [pcolors,fs]; % pcolors: range of colors for the  images. fs: Font size for the images
    0012 % viewparams{2} : Vector with the generations to inspect. For showing all the generations, set viewparams{2}=[1:ngen].
    0013 %
    0014 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
    0015
    0016
    0017 results = [];
    0018
    0019
    0020
    0021 AllContactMatrix = run_structures{4};
    0022
    0023 pcolors = viewparams{1}(1); % Range of  colors
    0024 fs = viewparams{1}(2);      % Fontsize for the figures
    0025
    0026
    0027 for j = 1:size(viewparams{2},2)
    0028   i = viewparams{2}(j); % Generation to view the sum of structures
    0029   ShowImage(pcolors,fs,AllContactMatrix{i});
    0030 end,