1.0 - 8.00 - Single-Input Attribution Example 4: Window Models - 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 Attribution@coprocessor (
  ON attribution_sample_table
    PARTITION BY user_id
    ORDER BY time_stamp
  USING
  EventColumn ('event')
  ConversionEvents ('SocialNetwork', 'PaidSearch')
  ExcludeEvents ('Email')
  OptionalEvents ('OrganicSearch', 'Direct', 'Referral')
  TimestampColumn ('time_stamp')
  WindowSize ('rows:10&seconds:20')
  Model1 ('SEGMENT_ROWS', '3:0.5:EXPONENTIAL:0.5,ROW',
          '4:0.3:WEIGHTED:0.4,0.3,0.2,0.1', '3:0.2:FIRST_CLICK:NA')
  Model2 ('SEGMENT_SECONDS', '6:0.5:UNIFORM:NA', '8:0.3:LAST_CLICK:NA',
          '6:0.2:FIRST_CLICK:NA')
) AS dt;

Output

user_id event time_stamp attribution time_to_conversion
1 impression 2001-09-27 23:00:01 0.2 -19
1 impression 2001-09-27 23:00:03 0  
1 impression 2001-09-27 23:00:05 0  
1 impression 2001-09-27 23:00:07 0  
1 impression 2001-09-27 23:00:09 0  
1 impression 2001-09-27 23:00:11 0  
1 impression 2001-09-27 23:00:13 0.3 -7
1 impression 2001-09-27 23:00:17 0.25 -3
1 impression 2001-09-27 23:00:19 0.25 -1
1 SocialNetwork 2001-09-27 23:00:20    
1 Direct 2001-09-27 23:00:21 0.5 -2
1 Referral 2001-09-27 23:00:22 0.5 -1
1 PaidSearch 2001-09-27 23:00:23    
2 impression 2001-09-27 23:00:29 0  
2 impression 2001-09-27 23:00:31 0  
2 impression 2001-09-27 23:00:33 0  
2 impression 2001-09-27 23:00:36 0  
2 impression 2001-09-27 23:00:38 0  
2 impression 2001-09-27 23:00:43 0.2 -16
2 impression 2001-09-27 23:00:47 0  
2 impression 2001-09-27 23:00:51 0.3 -8
2 impression 2001-09-27 23:00:53 0.25 -6
2 impression 2001-09-27 23:00:55 0.25 -4
2 SocialNetwork 2001-09-27 23:00:59