optNetwork clique

High-Volume Social Community Detection (Performance)

Scénario de test & Cas d'usage

Business Context

A social media platform wants to identify tight-knit communities within their user base to target specific group advertisements. Due to the large volume of data, the marketing team needs to find only significant communities (at least 4 members) and wants to stress-test the algorithm's performance on a generated dataset.
About the Set : optNetwork

Network analysis and graph algorithms.

Discover all actions of optNetwork
Data Preparation

Generating a larger dataset simulating user connections (circular graph structure to ensure cliques exist) to test filtering capabilities.

Copied!
1 
2DATA mycas.social_graph;
3DO i=1 to 100;
4u1 = 'User'||put(i, z3.);
5DO j=1 to 3;
6u2 = 'User'||put(mod(i+j, 100)+1, z3.);
7OUTPUT;
8END;
9END;
10 
11RUN;
12 

Étapes de réalisation

1
Run the clique action filtering for communities with a minimum size of 4 to ignore small, irrelevant groups.
Copied!
1 
2PROC CAS;
3ACTION optNetwork.clique / links={name='social_graph', vars={from='u1', to='u2'}} minSize=4 maxCliques='ALL' out={name='target_communities', replace=true};
4 
5RUN;
6 
2
Check the output table to ensure no clique has fewer than 4 members.
Copied!
1 
2PROC CAS;
3TABLE.fetch / TABLE='target_communities' to=10;
4 
5RUN;
6 

Expected Result


The system should filter out all small triangles or pairs and return only cliques with 4 or more nodes. The execution should complete without timeout, demonstrating efficiency on the generated graph.