1.0 - 8.00 - LocalClusteringCoefficient Example 2: WUN with DegreeRange 3 or Greater - Teradata Vantage

Teradata® Vantage Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.0
8.00
Release Date
May 2019
Content Type
Programming Reference
Publication ID
B700-4003-098K
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 1: 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.00000 0.44642
3 UK 4 6 1.00000 0.44642