network community

Granular Segmentation of Large Social Networks

Scénario de test & Cas d'usage

Business Context

A marketing firm analyzes a large social network. The initial communities are too large to be actionable for targeted campaigns. They need to recursively break down these giant components into smaller, hyper-segmented groups.
Data Preparation

Simulation of a larger graph with a dense core using a loop to generate connections.

Copied!
1 
2DATA mycas.social_graph;
3DO i=1 to 100;
4from_user=cat('User_', i);
5DO j=1 to 3;
6to_user=cat('User_', floor(100*rand('uniform')+1));
7IF from_user ne to_user THEN OUTPUT;
8END;
9END;
10 
11RUN;
12 

Étapes de réalisation

1
Execute Recursive Community Detection with Label Propagation.
Copied!
1PROC CAS;
2 network.community /
3 algorithm="LABELPROPAGATION"
4 links={name="social_graph"}
5 recursive={maxCommSize=10}
6 outNodes={name="micro_segments", replace=true};
7QUIT;

Expected Result


The action should run iteratively. The final `micro_segments` table should contain community IDs where no single community exceeds 10 nodes (maxCommSize), effectively breaking down the main connected component.