7.00.02 - SQL-MapReduce Call - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Published
September 2017
Content Type
Programming Reference
User Guide
Publication ID
B700-1022-700K
Language
English (United States)
Last Update
2018-04-17

The following SQL query generates the probabilities with state information:

DROP TABLE IF EXISTS pi_loyalty;
DROP TABLE IF EXISTS A_loyalty;
DROP TABLE IF EXISTS B_loyalty;

SELECT * FROM HMMSupervisedLearner (
  ON customer_loyalty AS "vertices"
    PARTITION BY user_id, seq_id
    ORDER BY user_id, seq_id, purchase_date ASC
  ModelColumn ('user_id')
  SeqColumn ('seq_id')
  ObsColumn ('observation')
  StateColumn ('loyalty_level')
  OutputTables ('pi_loyalty', 'A_loyalty', 'B_loyalty')
);