Assume that there are three hidden states to train the models and use the default method, random. The query outputs three state tables: pi_loan (initial state probabilities), A_loan (state transition probabilities) and B_loan (emission, or observation, probabilities).
DROP TABLE IF EXISTS pi_loan; DROP TABLE IF EXISTS A_loan; DROP TABLE IF EXISTS B_loan; SELECT * FROM HMMUnsupervisedLearner ( ON loan_prediction AS "vertices" PARTITION BY model_id, seq_id ORDER BY seq_vertex_id ModelColumn ('model_id') SeqColumn ('seq_id') ObsColumn ('observed_id') HiddenStateNum ('3') InitMethods ('random') OutputTables ('pi_loan', 'A_loan', 'B_loan') );