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

Add docs, iteration param and bug fix #6

Merged
merged 1 commit into from Feb 17, 2014

Conversation

adamilardi
Copy link
Contributor

K should be K-1 since that will be last last element of the array. It only noticed it go wrong when you pass in bad input like [0]
I added iterations to test out some of the -H param values

K should be K-1 since that will be last last element of the array. It only noticed it go wrong when you pass in bad input like [0]
I added iterations to test out some of the -H param values
@adamilardi
Copy link
Contributor Author

If you run this command on the new code you'll see this error
python findDirichletPrior.py -H1,4,5 < /dev/null -i 500000

dirichletMultinomialEstimation.py", line 101, in getPredictedStep
b = numSum / ((1.0/hConst) + denSum)
ZeroDivisionError: float division by zero

@maxsklar
Copy link
Owner

My original intent was to make "K" the error value. But that's kind of counter-intuitive, so I'll keep it like this.

maxsklar added a commit that referenced this pull request Feb 17, 2014
Add docs, iteration param and bug fix
@maxsklar maxsklar merged commit 8244926 into maxsklar:master Feb 17, 2014
@adamilardi
Copy link
Contributor Author

You can always chuck in some asserts if you still want to error
assert(sum(distribution) > 0)

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

Successfully merging this pull request may close these issues.

None yet

2 participants