7.00.02 - SQL-MapReduce Call - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Aster Analytics
Release Number
Release Date
September 2017
Content Type
Programming Reference
User Guide
Publication ID
English (United States)

The following SQL-MapReduce call generates the probabilities for each observation of the sequence for each model.

SELECT model_id, seq_id, observed_id, sequence_probability
  FROM hmmevaluator (
  ON pi_loan AS "InitStateProb" PARTITION BY model_id
  ON A_loan AS "TransProb" PARTITION BY model_id
  ON B_loan AS "EmissionProb" PARTITION BY model_id
  ON test_loan_prediction AS "observation"
    PARTITION BY model_id ORDER BY seq_id, seq_vertex_id
  InitStateModelColumn ('model_id')
  InitStateColumn ('state')
  InitStateProbColumn ('probability')
  TransAttributeColumn ('model_id')
  TransFromStateColumn ('from_state')
  TransToStateColumn ('to_state')
  TransProbColumn ('probability')
  EmitModelColumn ('model_id')
  EmitStateColumn ('state')
  EmitObsColumn ('observed')
  EmitProbColumn ('probability')
  ModelColumn ('model_id')
  SeqColumn ('seq_id')
  ObsColumn ('observed_id')
) ORDER BY seq_id, model_id, sequence_probability DESC;