jmschrei / pomegranate

Fast, flexible and easy to use probabilistic modelling in Python.
http://pomegranate.readthedocs.org/en/latest/
MIT License
3.29k stars 591 forks source link

Can the model state distributions be fixed? #976

Closed malonzm1 closed 2 years ago

malonzm1 commented 2 years ago

Hi!

Can the model state distributions be fixed? Only fit the transition probability matrix?

Thanks and good day.

jmschrei commented 2 years ago

Yes. Pass frozen=True when constructing the distribution. If you're training a HMM you can also pass distribution_inertia=1.0 into the from_samples or fit methods.

malonzm1 commented 2 years ago

Thanks. When I use frozen=True the state distribution parameters become NaN.

"parameters" : [ NaN, NaN ],

But distribution_intertia=1.0 works. Thanks.

jmschrei commented 2 years ago

Glad that it's working.