ChangePointDetection Example 5: One Series, SEGMENT Output, Penalty 10 - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantage™

SQL Call

SELECT * FROM ChangePointDetection (
  ON cpt PARTITION BY sid ORDER BY id
  USING
  ValueColumn ('val')
  Accumulate ('sid', 'id')
  Penalty (10)
  OutputOption ('SEGMENT')
) AS dt ORDER BY sid, id;

Output

sid#s id#s sid id segid
1 1 1 10 1
1 11 1 20 2
1 21 1 30 3
1 31 1 40 4