def test(): ''' Test the hybrid model Obtain predictions of both HMMs - use this to obtain the one with maximum probability ''' test_data = train_input + test_input predicted_outputs = [] for i in range(len(test_data)): m1 = M1.forward(tuple(test_data[i])) m2 = M2.forward(tuple(test_data[i])) predicted = max_index([m1,m2])-1 predicted_outputs.append(predicted) return predicted_outputs