1.1 - 8.10 - LocalClusteringCoefficient Example: WUN, DegreeRange 3+ - 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)

This example treats the input graph as a weighted, undirected network and outputs only nodes with degree range 3 or greater.

Input

Input tables are from LocalClusteringCoefficient Example: WUN:

  • Edges: trade
  • Vertices: country

SQL Call

SELECT * FROM LocalClusteringCoefficient (
  ON trade AS Edges PARTITION BY fromid
  ON country AS Vertices PARTITION BY countryid
  USING
  TargetKey ('toid')
  Directed ('f')
  EdgeWeight ('tradeweight')
  DegreeRange ('[3:]') 
  Accumulate ('countryid', 'name')
) AS dt ORDER BY countryid;

Output

 countryid name degree tri_cnt cc w_cc    
 --------- ---- ------ ------- -- ------- 
         1 usa       4       6  1 0.44642
         3 uk        4       6  1 0.44642

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