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()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
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: BVLC/caffe
Commit Name: 0db94786a7a463fed49825811fac903f1f1fc3c8
Time: 2014-08-05
Author: shelhamer@imaginarynumber.net
File Name: python/caffe/classifier.py
Class Name: Classifier
Method Name: predict
Project Name: kundajelab/dragonn
Commit Name: 9c158b87f5fb2dca1ed95884e667ab2fc218e1b7
Time: 2017-05-01
Author: jisraeli@stanford.edu
File Name: dragonn/models.py
Class Name: SequenceDNN
Method Name: deeplift