Scénario de test & Cas d'usage
Creating a directed graph with two disconnected components (Community A and Community B).
| 1 | |
| 2 | DATA mycas.social_graph; |
| 3 | INPUT follower $ leader $; |
| 4 | DATALINES; |
| 5 | UserA UserB UserB UserC UserC UserA UserD UserE UserE UserD ; |
| 6 | |
| 7 | RUN; |
| 8 |
| 1 | PROC CAS; |
| 2 | network.centrality / |
| 3 | links={name='social_graph'} |
| 4 | direction='DIRECTED' |
| 5 | pageRank='UNWEIGHT' |
| 6 | pageRankAlpha=0.85 |
| 7 | close='UNWEIGHT' |
| 8 | closeNoPath='HARMONIC' |
| 9 | outNodes={name='influencers', replace=true}; |
| 10 | RUN; |
The 'influencers' table is created. Despite the graph having two separate components (A-B-C and D-E), the action runs without error. 'cent_close_unwt' is calculated using the Harmonic formula to penalize unreachable nodes rather than returning infinity or erroring out. PageRank correctly identifies local leaders in both clusters.