934f26003a1b794a3a03ca824817fb1252dff270,hmmlearn/hmm.py,GMMHMM,_compute_log_likelihood,#GMMHMM#,574

Before Change


            g.fit(X)

    def _compute_log_likelihood(self, X):
        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()

After Change



    def _compute_log_likelihood(self, X):
        n_samples, _ = X.shape
        res = np.zeros((n_samples, self.n_components))

        for i in range(self.n_components):
            log_denses = self._compute_log_weighted_gaussian_densities(X, i)
            res[:, i] = logsumexp(log_denses, axis=1)

        return res

    def _initialize_sufficient_statistics(self):
        stats = super(GMMHMM, self)._initialize_sufficient_statistics()
        stats["n_samples"] = 0
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

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: _compute_log_likelihood


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: _compute_log_likelihood


Project Name: yzhao062/pyod
Commit Name: f88ec970f95c3b1fb1f0d72ccf0069732e4a0510
Time: 2019-06-12
Author: yalmardeny@tssg,org
File Name: pyod/models/sod.py
Class Name: SOD
Method Name: _sod


Project Name: yzhao062/pyod
Commit Name: f5b2d7fecaea7886cc527ee16c292e1cd4bb736a
Time: 2019-05-29
Author: yalmardeny@tssg,org
File Name: pyod/models/sod.py
Class Name: SOD
Method Name: _sod