Skip to content

Commit

Permalink
FIX icd training
Browse files Browse the repository at this point in the history
  • Loading branch information
jmschrei committed Mar 6, 2016
1 parent 7ca9dcc commit 6f2c996
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pomegranate/distributions.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ cdef class NormalDistribution( Distribution ):

cdef void _summarize( self, double* items, double* weights, SIZE_t n ) nogil:
"""Cython function to get the MLE estimate for a Gaussian."""

cdef SIZE_t i
cdef double x_sum = 0.0, x2_sum = 0.0, w_sum = 0.0

Expand Down Expand Up @@ -1967,7 +1967,7 @@ cdef class IndependentComponentsDistribution( MultivariateDistribution ):

for i in range(n):
for j in range(d):
( <Distribution> self.distributions_ptr[j] )._summarize( items+i*d+j, weights+i*d+j, 1 )
( <Distribution> self.distributions_ptr[j] )._summarize( items+i*d+j, weights+i, 1 )

def from_summaries( self, inertia=0.0 ):
"""
Expand Down
2 changes: 1 addition & 1 deletion pomegranate/hmm.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2245,7 +2245,7 @@ cdef class HiddenMarkovModel( Model ):
weights[i] += cexp( f[(i+1)*m + li] + b[(i+1)*m + li] -
log_sequence_probability )

(<Distribution>distributions[k])._summarize( sequence, weights, n )
(<Distribution>distributions[k])._summarize(sequence, weights, n)

# Update the master expected transitions vector representing the sparse matrix.
with gil:
Expand Down

0 comments on commit 6f2c996

Please sign in to comment.