vene/scikit-learn — pull request #18 by haarts (2013-07-01 13:55:17+00:00)
Title: Formatting fixes, merge master and a discussion on tests

All formatting comments from the original pull (https://github.com/scikit-learn/scikit-learn/pull/1954) are fixed and master is merged.

As for the tests: I see what you mean and I think I know roughly how to fix this but I lack the experience required. My thoughts;
The test for the `gibbs` method is conceptually 'off'.
It should test if doing many `gibbs` steps converges to a known distribution. Now this is were my understanding of the code/theory is getting hazy. If you have an Bernoulli distribution with _p=0.5_ and setting the `components_` attribute to `[1,1]` (one feature, one hidden unit with weights 1) and start drawing from the aforementioned Bernoulli distribution doing many gibbs steps and averaging the result should more or less equal _p=0.5_.
I think.

I would _not_ test `sample_hiddens` as this is an implementation detail of the `gibbs` method.