EigenvectorCentrality Example: Eigenvector Centrality - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.10
1.1
Published
October 2019
Language
English (United States)
Last Update
2019-12-31
dita:mapPath
ima1540829771750.ditamap
dita:ditavalPath
jsj1481748799576.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
Graph of input for examples of Machine Learning Engine function EigenvectorCentrality

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

Family is 'eigenVector' by default.

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.6494505502390958
 b  0.35224436623137406
 d   0.5283665493470611
 a  0.41829018489975667

Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.