levelAnalysis

PURPOSE ^

LEVELANALYSIS do horizontal, vertical analyses, and so on.

SYNOPSIS ^

function [ network ] = levelAnalysis( network, maxLevel, doNewNode )

DESCRIPTION ^

 LEVELANALYSIS do horizontal, vertical analyses, and so on.

   [ network ] = levelAnalysis( network, maxLevel, doNewNode )
   This function do several network analyses. It rearrage position of nodes
   by modules (nodes in the same modules would be close together), count number
   of new nodes within pathway in different propagation level (if doNewNode is
   true), compute pathway number between input-output pairs in different
   propagation levels, generate channel connectivity matrix in different
   levels, compute vertical and horizontal propagation, compute participation
   coefficient by the module sorted before.

   sortByModule() -> reorder nodes by arraging the same module node together
   countIOPassNode() -> compute number of new nodes in levels
   computePathNum() -> compute pathway number of each level
   logMatrix() -> compute channel connectivity matrix
   rowPathRatio() -> compute horizontal propagation
   logCorrCoef() -> compute vertical propagation
   participateCoef() -> compute modified participation coefficient

   Input:
       network: a network structure.
       maxLevel: max level for analyses
       doNewNode: boolean for counting number of new nodes

   Output:
       network: a network structure with analyses result.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ network ] = levelAnalysis( network, maxLevel, doNewNode )
0002 % LEVELANALYSIS do horizontal, vertical analyses, and so on.
0003 %
0004 %   [ network ] = levelAnalysis( network, maxLevel, doNewNode )
0005 %   This function do several network analyses. It rearrage position of nodes
0006 %   by modules (nodes in the same modules would be close together), count number
0007 %   of new nodes within pathway in different propagation level (if doNewNode is
0008 %   true), compute pathway number between input-output pairs in different
0009 %   propagation levels, generate channel connectivity matrix in different
0010 %   levels, compute vertical and horizontal propagation, compute participation
0011 %   coefficient by the module sorted before.
0012 %
0013 %   sortByModule() -> reorder nodes by arraging the same module node together
0014 %   countIOPassNode() -> compute number of new nodes in levels
0015 %   computePathNum() -> compute pathway number of each level
0016 %   logMatrix() -> compute channel connectivity matrix
0017 %   rowPathRatio() -> compute horizontal propagation
0018 %   logCorrCoef() -> compute vertical propagation
0019 %   participateCoef() -> compute modified participation coefficient
0020 %
0021 %   Input:
0022 %       network: a network structure.
0023 %       maxLevel: max level for analyses
0024 %       doNewNode: boolean for counting number of new nodes
0025 %
0026 %   Output:
0027 %       network: a network structure with analyses result.
0028 
0029 %   ---------
0030 %   Yen-Nan Lin, NTHU, 2010-2014, Matlab 2012a
0031 
0032 if nargin < 3
0033     doNewNode = false;
0034 end
0035 
0036 % reorder nodes with module
0037 network = sortByModule(network);
0038 network.NumModule = numel(unique(network.moduleId));
0039 
0040 % compute number of new nodes within the pathway in different levels
0041 if doNewNode == true
0042     [~, nNewNodeMat] = countIOPassNode(network, maxLevel);
0043     network.NumNewNodeMat = nNewNodeMat;
0044 end
0045 
0046 for iLevel = 1:maxLevel
0047     % compute pathway number of each level
0048     [levelMatrix, levelAllMatrix] = computePathNum(network, iLevel);
0049     network.LevelMatrix{iLevel} = single(full(levelMatrix));
0050 
0051     % build channel connectivity matrix
0052     network.ChConnectMat{iLevel} = logMatrix(network.LevelMatrix{iLevel});
0053 
0054     % compute horizontal propagation
0055     tmpHorzProp = rowPathRatio(network.LevelMatrix{iLevel});
0056     network.HorzProp(iLevel) = mean(tmpHorzProp);
0057 end
0058 
0059 % compute vertical propagation
0060 network.VertProp = logCorrCoef(network);
0061 
0062 % participation coefficient
0063 network.PartpCoef = participateCoef(network);
0064 end

Generated on Thu 30-Jan-2014 00:00:07 by m2html © 2005