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.
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 ofself
in these cases.