markovmodel / PyEMMA

🚂 Python API for Emma's Markov Model Algorithms 🚂
http://pyemma.org
GNU Lesser General Public License v3.0
311 stars 119 forks source link

HMM submodel fix #1323

Closed thempel closed 6 years ago

thempel commented 6 years ago

Calling the submodel() function of a (Bayesian) HMM would not only return a sub-model but indeed overwrite the HMM instance directly. This makes sense when used within _estimate(), but not if a user wants to have an actual submodel. The PR submodels and returns a copy of self in these cases.