1.0 - 8.00 - ChangePointDetection Example 5: One Series, SEGMENT Output, Penalty 10 - 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)

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