NETWORK Procedure
Example 2.12 Connected Components for US Patent Citations
This example looks at the structural relationship of US patent citations by using a large data set that is maintained by the Stanford Network Analysis Project (SNAP) (Leskovec 2014). The citation graph includes over 16 million citations made to patents between 1975 and 1999.
The following statements construct the links data table mylib.Patents from a local copy of the raw patent citation data:
filename in 'cit-Patents.txt';
data mylib.Patents;
infile in firstobs=5 dlm='09'X;
input from to;
run;
The following statements find the connected components of the citation graph by using a union-find algorithm.
proc network
links = mylib.Patents
outNodes = mylib.NodeSetOut;
connectedComponents
out = mylib.ConCompOut;
run;
%put &_NETWORK_;
The progress of the procedure is shown in Output 2.12.1.
Output 2.12.1: PROC NETWORK Log: Connected Components for US Patent Citations
| NOTE: ------------------------------------------------------------------------------------------ |
| NOTE: Running NETWORK. |
| NOTE: ------------------------------------------------------------------------------------------ |
| NOTE: The number of nodes in the input graph is 3774768. |
| NOTE: The number of links in the input graph is 16518948. |
| NOTE: Processing connected components using 12 threads across 1 machines. |
| NOTE: The graph has 3627 connected components. |
| NOTE: Processing connected components used 0.20 (cpu: 2.00) seconds. |
| NOTE: SAS Viya processed the request in 1.362051 seconds. |
| NOTE: The data set MYLIB.NODESETOUT has 3774768 observations and 2 variables. |
| NOTE: The data set MYLIB.CONCOMPOUT has 3627 observations and 2 variables. |
| STATUS=OK PROBLEM_TYPE=CONNECTEDCOMPONENTS SOLUTION_STATUS=OK NUM_COMPONENTS=3627 |
| CPU_TIME=8.28 REAL_TIME=1.36 |
The 10 biggest components are shown in Output 2.12.2. It is interesting to note that the vast majority of patents (over 99%) are all contained in the same component. This is not too surprising, because many of the seminal patent claims are required in order to understand subsequent inventions.
Output 2.12.2: Ten Largest Components for US Patent Citations
| concomp | nodes |
|---|---|
| 1 | 3764117 |
| 69 | 19 |
| 295 | 16 |
| 301 | 15 |
| 43 | 14 |
| 163 | 14 |
| 2680 | 14 |
| 3222 | 14 |
| 194 | 13 |
| 1283 | 13 |