0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 close all;
0011
0012
0013 nNode = ceNetwork.size;
0014 nInput = ceNetwork.inputNumber;
0015 nOutput = ceNetwork.outputNumber;
0016 nInter = ceNetwork.size - nInput - nOutput;
0017 nEdge = mean(sum(ceNetwork.matrix));
0018 repeatTimes = 100;
0019 nHub = 15;
0020 rewireProb = 0.3;
0021 hubStyleSet = {'Provincial', 'Connector', 'Kinless'};
0022
0023
0024 xErrBarWidth = 0.015;
0025 yErrBarWidth = 0.025;
0026 textSize = 16;
0027 lineWidth = 3;
0028 markerSize = 10;
0029 markerScale = 1.5;
0030
0031
0032 FIG_SIZE = [0 0 600 650];
0033 figure('name', 'summary', 'outerPosition', FIG_SIZE, 'color', 'w');
0034 hold on;
0035 plot(ceNetwork.HorzProp(3), ceNetwork.VertProp(3), ...
0036 'Marker', netMarker('CE'), 'Color', netColor('CE'), ...
0037 'MarkerFaceColor', netMarkerFace('CE'), ...
0038 'MarkerSize', markerSize, 'LineWidth', lineWidth);
0039 plot(meanRandNet.HorzProp(3), meanRandNet.VertProp(3), ...
0040 'Marker', netMarker('ER'), 'Color', netColor('ER'), ...
0041 'MarkerFaceColor', netMarkerFace('ER'), ...
0042 'MarkerSize', markerSize * markerScale, 'LineWidth', lineWidth);
0043 plot(meanRegularNet.HorzProp(3), meanRegularNet.VertProp(3), ...
0044 'Marker', netMarker('RL'), 'Color', netColor('RL'), ...
0045 'MarkerFaceColor', netMarkerFace('RL'), ...
0046 'MarkerSize', markerSize, 'LineWidth', lineWidth);
0047 plot(meanRingNet.HorzProp(3), meanRingNet.VertProp(3), ...
0048 'Marker', netMarker('SW'), 'Color', netColor('SW'), ...
0049 'MarkerFaceColor', netMarkerFace('SW'), ...
0050 'MarkerSize', markerSize, 'LineWidth', lineWidth);
0051 set(gca, 'FontSize', 18, 'lineWidth', 4, 'FontWeight', 'bold');
0052 legend('boxoff');
0053 xlabel('Horizontal propagation');
0054 ylabel('Vertical propagation');
0055 box off;
0056
0057
0058 meanSwHubNet = cell(1, numel(hubStyleSet));
0059 for jStype = 1:numel(hubStyleSet)
0060 hubStyle = hubStyleSet{jStype};
0061 clear swHubNet meanswHubNet
0062 for iTime = 1:repeatTimes
0063 seedNumber = iTime * STRIDE_SEED_NUMBER;
0064 swHubNet{iTime} = ...
0065 smallHubNetwork(nNode, rewireProb, seedNumber, nEdge, nHub, hubStyle);
0066 swHubNet{iTime} = setIO(swHubNet{iTime}, ceNetwork.inputNumber, ...
0067 ceNetwork.outputNumber);
0068 swHubNet{iTime} = levelAnalysis(swHubNet{iTime}, MAX_LEVEL);
0069 end
0070 tmpHorz = cellfun(@(x) x.HorzProp(3), swHubNet);
0071 tmpVert = cellfun(@(x) x.VertProp(3), swHubNet);
0072 meanSwHubNet{jStype} = meanFieldInCells(swHubNet);
0073 meanSwHubNet{jStype}.StdHorzProp = std(tmpHorz);
0074 meanSwHubNet{jStype}.StdVertProp = std(tmpVert);
0075 smallHubNet{jStype} = swHubNet;
0076 end
0077
0078
0079 hold on;
0080 for iStyle = 1:numel(hubStyleSet)
0081 thisStyle = hubStyleSet{iStyle};
0082 if netMarker(thisStyle) == '+' || netMarker(thisStyle) == 'x'
0083 tmpMarkerSize = markerSize * markerScale;
0084 else
0085 tmpMarkerSize = markerSize;
0086 end
0087
0088 plot(meanSwHubNet{iStyle}.HorzProp(3), ...
0089 meanSwHubNet{iStyle}.VertProp(3), ...
0090 'Marker', netMarker(thisStyle), 'Color', netColor(thisStyle), ...
0091 'MarkerFaceColor', netMarkerFace(thisStyle), ...
0092 'MarkerSize', tmpMarkerSize, 'LineWidth', lineWidth);
0093 end
0094 hold off;
0095
0096
0097 hold on;
0098 tmpHorz = cellfun(@(x) x.HorzProp(3), randNetwork);
0099 tmpVert = cellfun(@(x) x.VertProp(3), randNetwork);
0100 hErr = ploterr(mean(tmpHorz), mean(tmpVert), std(tmpHorz), std(tmpVert), ...
0101 'abshhx', xErrBarWidth, 'abshhy', yErrBarWidth);
0102 set(hErr, 'lineWidth', 2, 'Color', netColor('ER'));
0103
0104 tmpHorz = cellfun(@(x) x.HorzProp(3), regularRingNet);
0105 tmpVert = cellfun(@(x) x.VertProp(3), regularRingNet);
0106 hErr = ploterr(mean(tmpHorz), mean(tmpVert), std(tmpHorz), std(tmpVert), ...
0107 'abshhx', xErrBarWidth, 'abshhy', yErrBarWidth);
0108 set(hErr, 'lineWidth', 2, 'Color', netColor('RL'));
0109
0110 tmpHorz = cellfun(@(x) x.HorzProp(3), smallRingNet);
0111 tmpVert = cellfun(@(x) x.VertProp(3), smallRingNet);
0112 hErr = ploterr(mean(tmpHorz), mean(tmpVert), std(tmpHorz), std(tmpVert), ...
0113 'abshhx', xErrBarWidth, 'abshhy', yErrBarWidth);
0114 set(hErr, 'lineWidth', 2, 'Color', netColor('SW'));
0115
0116 for iStyle = 1:numel(hubStyleSet)
0117 hErr = ploterr(meanSwHubNet{iStyle}.HorzProp(3), ...
0118 meanSwHubNet{iStyle}.VertProp(3), ...
0119 meanSwHubNet{iStyle}.StdHorzProp, ...
0120 meanSwHubNet{iStyle}.StdVertProp, ...
0121 'abshhx', xErrBarWidth, 'abshhy', yErrBarWidth);
0122 set(hErr, 'lineWidth', 2, 'Color', netColor(hubStyleSet{iStyle}));
0123 end
0124
0125
0126 for iStyle = 1:numel(hubStyleSet)
0127 plot([meanRingNet.HorzProp(3) meanSwHubNet{iStyle}.HorzProp(3)], ...
0128 [meanRingNet.VertProp(3) meanSwHubNet{iStyle}.VertProp(3)], ...
0129 '--', 'lineWidth', 2, 'Color', netColor(hubStyleSet{iStyle}));
0130 end
0131 hold off;
0132
0133
0134 text(double(ceNetwork.HorzProp(3)), double(ceNetwork.VertProp(3) + 0.02), ...
0135 'CE', 'FontSize', textSize, 'FontWeight', 'bold', ...
0136 'VerticalAlignment', 'bottom', 'HorizontalAlignment', 'center');
0137 text(double(meanRandNet.HorzProp(3)), double(meanRandNet.VertProp(3)), ...
0138 ' ER', 'FontSize', textSize, 'FontWeight', 'bold');
0139 text(double(meanRegularNet.HorzProp(3)), double(meanRegularNet.VertProp(3)), ...
0140 ' RL', 'FontSize', textSize, 'FontWeight', 'bold');
0141 text(double(meanRingNet.HorzProp(3)), double(meanRingNet.VertProp(3)), ...
0142 'SW ', 'FontSize', textSize, 'FontWeight', 'bold', ...
0143 'HorizontalAlignment', 'right');
0144 text(double(meanSwHubNet{1}.HorzProp(3)), double(meanSwHubNet{1}.VertProp(3)), ...
0145 'Provincial ', 'FontSize', textSize, 'FontWeight', 'bold', ...
0146 'HorizontalAlignment', 'right');
0147 text(double(meanSwHubNet{2}.HorzProp(3)), double(meanSwHubNet{2}.VertProp(3)), ...
0148 ' Connector', 'FontSize', textSize, 'FontWeight', 'bold', ...
0149 'VerticalAlignment', 'top');
0150 text(double(meanSwHubNet{3}.HorzProp(3)), double(meanSwHubNet{3}.VertProp(3) - 0.02), ...
0151 'Kinless', 'FontSize', textSize, 'FontWeight', 'bold', ...
0152 'VerticalAlignment', 'top', 'HorizontalAlignment', 'center');
0153
0154 breakYaxis(2);
0155 set(gca, 'xtick', 0:0.2:1);