1.1 - 8.10 - EigenvectorCentrality Example: Eigenvector Centrality - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)

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.