diff --git a/sklearn/hmm.py b/sklearn/hmm.py index e8c2542fb16b9438bb69164ac984be7b3477a12f..210591cecae5ccdcd22dd767acab1d50693beb51 100644 --- a/sklearn/hmm.py +++ b/sklearn/hmm.py @@ -135,7 +135,7 @@ class _BaseHMM(BaseEstimator): self._algorithm = algorithm else: self._algorithm = "viterbi" - self.random_state = check_random_state(random_state) + self.random_state = random_state def eval(self, obs): """Compute the log probability under the model and compute posteriors @@ -898,6 +898,7 @@ class MultinomialHMM(_BaseHMM): def _init(self, obs, params='ste'): super(MultinomialHMM, self)._init(obs, params=params) + self.random_state = check_random_state(self.random_state) if 'e' in params: emissionprob = normalize(self.random_state.rand(self.n_components,