The core action calculates the k-core decomposition of the graph. The k-core of a graph is a maximal subgraph that contains nodes of degree at least k. This action is useful for understanding the structure of a graph and identifying its most densely connected parts.
| Parameter | Description |
|---|---|
| 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 n (in seconds) for displaying iteration logs for some algorithms. |
| logLevel | Controls the amount of information that is displayed in the SAS log. |
| maxTime | Specifies the maximum amount of time for the algorithm to spend. |
| 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. |
| 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 and the results. |
| 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 example creates a simple undirected graph to illustrate the core decomposition. The graph has 9 nodes and several links forming clusters with varying densities.
| 1 | DATA mycas.Links; |
| 2 | INFILE DATALINES delimiter=','; |
| 3 | INPUT from $ to $ @@; |
| 4 | DATALINES; |
| 5 | A,B, A,C, A,D, B,C, B,D, C,D |
| 6 | E,F, E,G, F,G |
| 7 | H,I |
| 8 | ; |
| 9 | RUN; |
This example calculates the core decomposition of the graph defined in the `mycas.Links` table. The results, including the core number for each node, are stored in the `mycas.OutNodes` table.
| 1 | PROC CAS; |
| 2 | ACTION network.core / |
| 3 | links={name='Links'} |
| 4 | outNodes={name='OutNodes', replace=true}; |
| 5 | RUN; |
| 6 | ACTION TABLE.fetch / TABLE='OutNodes'; |
| 7 | RUN; |
| 8 | QUIT; |
This example treats the graph as directed and calculates the core decomposition. The `direction` parameter is set to 'DIRECTED'. The core number for a node in a directed graph is based on its in-degree and out-degree.
| 1 | PROC CAS; |
| 2 | ACTION network.core / |
| 3 | direction='DIRECTED' |
| 4 | links={name='Links'} |
| 5 | outNodes={name='OutNodes_Directed', replace=true}; |
| 6 | RUN; |
| 7 | ACTION TABLE.fetch / TABLE='OutNodes_Directed'; |
| 8 | RUN; |
| 9 | QUIT; |
The bank's Fraud Department wants to identify 'synthetic identity' rings. These are groups of accounts that artificially inflate their creditworthiness by circulating money rapi...
A Marketing agency analyzes a massive social media dataset (Twitter/X style) to find 'Core Influencers'. Unlike simple follower counts, they want to find users who are followed ...
IT Operations is mapping server dependencies. Some legacy servers ping themselves (localhost loopback) for heartbeat checks. The team needs to identify critical dependency clust...