EigenVectorCentrality Example 1: Eigenvector Centrality (by Default) - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

Input

In the following figure, nodes represent college sophomores and edges represent the number of elective subjects that both sophomores have taken.

EigenVectorCentrality Examples Input Graph

The graph in the figure is represented by the vertices and edges tables sophomores and common_classes, respectively.

vertices: sophomores
id name
A Allen
B Becky
C Cathy
D Darren
edges: common_classes
startid endid electives
A B 1
A C 1
B C 1
C D 1
D A 1

SQL Call

SELECT * FROM EigenVectorCentrality (
  ON sophomores AS vertices PARTITION BY id
  ON common_classes AS edges PARTITION BY startid
  USING
  TargetKey ('endid')
  Accumulate ('id')
  EdgeWeight ('electives')
) AS dt ORDER BY centrality DESC;

Output

id centrality
C 0.649450550239096
D 0.528366549347061
A 0.418290184899757
B 0.352244366231374