forcedotcom / distributions

Low-level primitives for collapsed Gibbs sampling in python and C++
BSD 3-Clause "New" or "Revised" License
33 stars 25 forks source link

Sampler doesn't work in python #45

Closed jglidden closed 10 years ago

jglidden commented 10 years ago
> from distributions.lp.models import nich
> shared = nich.Shared.from_dict(nich.EXAMPLES[0]['shared'])
> group = nich.Group.from_values(shared, nich.sample_group(shared, 10))
> sampler = nich.Sampler(shared, group)
> sampler.eval(shared)
0.0

and

> nosetests distributions/tests/test_models.py:test_joint
FSegmentation fault (core dumped)

core dump is also not caught by running tests via make.

jglidden commented 10 years ago

Fixed this by instead running

> sampler = nich.Sampler()
> sampler.init(shared, group)