Commit 2c8c9899 authored by Tiago Peixoto's avatar Tiago Peixoto

Fix bug with EMBlockState.learn()

This fixes issue #475.
parent 84e0715c
Pipeline #409 failed with stage
in 207 minutes and 39 seconds
......@@ -186,7 +186,7 @@ class EMBlockState(object):
"""
return self._state.learn_iter()
def learn(state, epsilon=1e-3):
def learn(self, epsilon=1e-3):
"""Perform 'maximization' iterations until convergence according to ``epsilon``.
The last update delta is returned.
......@@ -281,7 +281,7 @@ def em_infer(state, max_iter=1000, max_e_iter=1, epsilon=1e-3,
"""
if learn_first:
state.learn(state, epsilon)
state.learn(epsilon)
niter = 0
delta = epsilon + 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment