From a3f54a16191f709716e1f380320a79b36f7708e9 Mon Sep 17 00:00:00 2001 From: ncguilbeault Date: Wed, 10 Jul 2024 01:19:51 +0100 Subject: [PATCH] Update to only permute if observations are gaussian --- src/Bonsai.ML.HiddenMarkovModels/main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Bonsai.ML.HiddenMarkovModels/main.py b/src/Bonsai.ML.HiddenMarkovModels/main.py index c7d98013..36f44fa7 100644 --- a/src/Bonsai.ML.HiddenMarkovModels/main.py +++ b/src/Bonsai.ML.HiddenMarkovModels/main.py @@ -150,9 +150,11 @@ def start_loop(loop): loop.run_forever() def on_completion(future): - permutation = calculate_permutation( - self.observation_params[0], self.params[2][0]) - super(HiddenMarkovModel, self).permute(permutation) + + if self.observation_type == "gaussian": + permutation = calculate_permutation( + self.observation_params[0], self.params[2][0]) + super(HiddenMarkovModel, self).permute(permutation) initial_state_distribution = None if vars_to_estimate[ "initial_state_distribution"] else self.initial_state_distribution