The 'clique' action finds maximal cliques in a graph. A clique is a subgraph where every two distinct vertices are adjacent. A maximal clique is a clique that cannot be extended by adding one more adjacent vertex. This is useful in social network analysis to find groups of people who all know each other, or in bioinformatics to identify functional modules in protein-protein interaction networks.
| Parameter | Description |
|---|---|
| cliqueNumber | Specifies whether to calculate the clique number of the graph. |
| deterministic | When set to True, ensures that each invocation (with the same machine configuration and parameter settings) produces the same final result. |
| direction | Specifies whether to consider the input graph as directed or undirected. |
| display | Specifies a list of results tables to send to the client for display. |
| distributed | When set to True, uses a distributed graph. |
| graph | Specifies the in-memory graph to use. |
| indexOffset | Specifies the index offset for identifiers in the log and results output data tables. |
| links | Specifies the input data table that contains the graph link information. |
| linksVar | Specifies the data variable names for the links table. |
| logFreqTime | Controls the frequency in seconds for displaying iteration logs. |
| logLevel | Controls the amount of information that is displayed in the SAS log. |
| maxCliques | Specifies the maximum number of cliques to return. |
| maxLinkWeight | Specifies the maximum sum of link weights in a clique. |
| maxNodeWeight | Specifies the maximum sum of node weights in a clique. |
| maxSize | Specifies the maximum number of nodes in a clique. |
| maxTime | Specifies the maximum amount of time for the algorithm to spend. |
| minLinkWeight | Specifies the minimum sum of link weights in a clique. |
| minNodeWeight | Specifies the minimum sum of node weights in a clique. |
| minSize | Specifies the minimum number of nodes in a clique. |
| multiLinks | When set to True, includes multilinks when an input graph is read. |
| nodes | Specifies the input data table that contains the graph node information. |
| nodesVar | Specifies the data variable names for the nodes table. |
| nThreads | Specifies the maximum number of threads to use for multithreaded processing. |
| out | Specifies the output data table to contain the maximal cliques. |
| outGraphList | Specifies the output data table to contain summary information about in-memory graphs. |
| outLinks | Specifies the output data table to contain the graph link information. |
| outNodes | Specifies the output data table to contain the graph node information. |
| outputTables | Lists the names of results tables to save as CAS tables on the server. |
| selfLinks | When set to True, includes self-links when an input graph is read. |
| standardizedLabels | When set to True, specifies that the input graph data are in a standardized format. |
| standardizedLabelsOut | When set to True, requests that the output graph data include standardized format. |
| timeType | Specifies whether to use CPU time or real time for the maximum time limit. |
This dataset represents a friendship network where each link indicates a friendship between two people.
| 1 | DATA mycas.LinkSetIn; |
| 2 | INPUT from $ to $ @@; |
| 3 | DATALINES; |
| 4 | A B A C A D B C B D B E C D C F D E D F E F E G F G |
| 5 | ; |
| 6 | RUN; |
This example finds all maximal cliques in the friendship network.
| 1 | PROC CAS; |
| 2 | ACTION optNetwork.clique / |
| 3 | links={name='LinkSetIn'} |
| 4 | maxCliques='ALL' |
| 5 | out={name='Cliques', replace=true}; |
| 6 | RUN; |
| 7 | PRINT TABLE='Cliques'; |
| 8 | RUN; |
This example finds all maximal cliques in the friendship network that have at most 3 members.
| 1 | PROC CAS; |
| 2 | ACTION optNetwork.clique / |
| 3 | links={name='LinkSetIn'} |
| 4 | maxCliques='ALL' |
| 5 | maxSize=3 |
| 6 | out={name='Cliques_maxsize3', replace=true}; |
| 7 | RUN; |
| 8 | PRINT TABLE='Cliques_maxsize3'; |
| 9 | RUN; |