1.1 - 8.10 - Canopy Example - 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

The input table has more than 6000 rows of computer specifications.

InputTable: computers_train1
id price speed hd ram screen
1 1499 25 80 4 14
2 1795 33 85 2 14
3 1595 25 170 4 15
4 1849 25 170 8 14
5 3295 33 340 16 14
6 3695 66 340 16 14
7 1720 25 170 4 14
8 1995 50 85 2 14
9 2225 50 210 2 14
12 2605 66 210 8 14
13 2045 50 130 4 14
14 2295 25 245 8 14
16 2225 50 130 4 14
17 1595 33 85 2 14
18 2325 33 210 4 15
19 2095 33 250 4 15
20 4395 66 452 8 14
... ... ... ... ... ...

SQL Call

SELECT * FROM Canopy(
  ON computers_train1 AS InputTable
  USING
  LooseDistance(1000)
  TightDistance(500)
) AS dt;

Output

 canopyid price            speed            hd               ram              screen           
 -------- ---------------- ---------------- ---------------- ---------------- ---------------- 
        1 3669.84615384615 57.2307692307692 363.153846153846 8.61538461538461 14.5384615384615
        2 1893.51282051282 34.6153846153846  156.25641025641 4.46153846153846 14.0769230769231
        3 2585.75471698113 45.4528301886792 227.320754716981 6.86792452830189 14.4339622641509

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