934f26003a1b794a3a03ca824817fb1252dff270,hmmlearn/hmm.py,GMMHMM,_generate_sample_from_state,#GMMHMM#,577

Before Change


        return np.array([g.score(X) for g in self.gmms_]).T

    def _generate_sample_from_state(self, state, random_state=None):
        return self.gmms_[state].sample(1, random_state=random_state).flatten()

    def _initialize_sufficient_statistics(self):
        stats = super(GMMHMM, self)._initialize_sufficient_statistics()

After Change


            random_state = self.random_state
        random_state = check_random_state(random_state)

        cur_means = self.means_[state]
        cur_covs = self.covars_[state]
        cur_weights = self.weights_[state]

        i_gauss = random_state.choice(self.n_mix, p=cur_weights)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: hmmlearn/hmmlearn
Commit Name: 934f26003a1b794a3a03ca824817fb1252dff270
Time: 2016-07-09
Author: yanenkoalexandr@gmail.com
File Name: hmmlearn/hmm.py
Class Name: GMMHMM
Method Name: _generate_sample_from_state


Project Name: commonsense/conceptnet5
Commit Name: d3266d6e0ff7d771bd408631f7849e2e4500bebd
Time: 2017-06-16
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/transforms.py
Class Name:
Method Name: make_replacements_faster


Project Name: developmentseed/label-maker
Commit Name: 4163c4eb8cffd43b05931100fa2dd807a3b19fbb
Time: 2018-01-26
Author: geospatialanalystyi@gmail.com
File Name: examples/utils/tf_records_generation.py
Class Name:
Method Name: main