Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's a ValueError on EM_demo.py #38

Open
tiddlerhxy opened this issue Feb 28, 2019 · 0 comments
Open

There's a ValueError on EM_demo.py #38

tiddlerhxy opened this issue Feb 28, 2019 · 0 comments

Comments

@tiddlerhxy
Copy link

hello!
When I ran EM_demo.py, an error occurred,can you tell me what happened?
The following is the wrong report:
Traceback (most recent call last):
File "/root/root/eyes/appone/tt6.py", line 55, in
fitmodel.EM_fit()
File "/usr/local/python3.6.6/lib/python3.6/site-packages/pybasicbayes/abstractions.py", line 221, in EM_fit
return self._EM_fit(self.EM_step,tol=tol,maxiter=maxiter)
File "/usr/local/python3.6.6/lib/python3.6/site-packages/pybasicbayes/abstractions.py", line 206, in _EM_fit
method()
File "/usr/local/python3.6.6/lib/python3.6/site-packages/pybasicbayes/models/mixture.py", line 481, in EM_step
[l.expectations for l in self.labels_list])
File "/usr/local/python3.6.6/lib/python3.6/site-packages/pybasicbayes/distributions/multinomial.py", line 190, in max_likelihood
counts = self._get_weighted_statistics(data,weights)
File "/usr/local/python3.6.6/lib/python3.6/site-packages/pybasicbayes/distributions/multinomial.py", line 140, in _get_weighted_statistics
data = data if data else [None]*len(weights)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant