fmorenopino / HeterogeneousHMM

Discrete, Gaussian, and Heterogenous HMM models full implemented in Python. Missing data, Model Selection Criteria (AIC/BIC), and Semi-Supervised training supported. Easily extendable with other types of probablistic models.
https://pyhhmm.readthedocs.io/en/latest/
Apache License 2.0
74 stars 14 forks source link

Replicability #10

Closed BenSeimon closed 4 months ago

BenSeimon commented 4 months ago

Hi,

First of all, thank you so much for this package. Clear documentation and it has been a key source for some academic work we are doing.

On replicability, for the same observation sequences and parameters of the HMM (e.g. learning rate), will the package always return the same trained HMM?

Many thanks,

Ben

BenSeimon commented 4 months ago

Hi sorry, just to add to this. I just tested the above and found it not to be true i.e. for identical parameters and observation sequences, the trained HMM is not the same.

Is there a way to set a seed to ensure replicability?

Ben

semese commented 4 months ago

Hi, I'm sorry for not getting back to you sooner. I am glad to hear that you have found our HMM implementation useful :) For replicability, you'd have to ensure that the initial model parameters are fixed. You can initialise them manually or modify the code slightly to add a random seed to anything sampled from some distribution.

Unfortunately, we're not currently available to work on code updates, but if you want to implement the feature, you can open a pull request and contribute to the repo.

Best, Emese