-
Notifications
You must be signed in to change notification settings - Fork 31
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
Rewrote bayes_risk to allow multiple expparams #134
Conversation
3 similar comments
3 similar comments
I'm done with what I wanted to do in this PR (aside from doc build error fix). Thanks to @whitewhim2718 and his feature-generalized-outcomes branch from which I copied some ideas and code. As usual, I find the doc error messages pretty cryptic, and don't know where to start at the moment. |
I took a look at your error log. All the red lines seem to be warnings. I'm pretty sure the error failing the build is |
The last master build does this: Running LaTeX files through pdflatex...
$ make -C _build/latex all-pdf
make[1]: Entering directory `/home/travis/build/QInfer/python-qinfer/doc/_build/latex'
$ pdflatex 'QInfer.tex' And your build is doing this: Running LaTeX files through pdflatex...
$ make -C _build/latex all-pdf
make[1]: Entering directory `/home/travis/build/QInfer/python-qinfer/doc/_build/latex'
$ latexmk -pdf -dvi- -ps- 'QInfer.tex' Taking a look at the installed dependencies, I see master installed |
Thanks for looking into this, @scasagrande . It seems that they switched to latexmk recently: sphinx-doc/sphinx#3543 |
Bah, need to somehow turn off interactive mode in latexmk, the build has stalled. Either that, or revert to an older version of sphinx, which is probably not a great idea. |
1 similar comment
2 similar comments
I'd lock it to the older version for now, and then make it a separate PR to update to the latest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, it looks great! I apologize as always for the delay, but I'm happy to merge as soon as we figure out the LaTeX errors. I'll take a stab at that, cherry picking off your improvements to .travis.yml
in a separate PR.
src/qinfer/smc.py
Outdated
# compute the hypothetical weights, likelihoods and normalizations for | ||
# every possible outcome and expparam | ||
# the likelihood over outcomes should sum to 1, so don't compute for last outcome | ||
w_hyp, L, N = self.hypothetical_update( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this optimization, it should help a lot with models that have a small number of outcomes. Since the same optimization appears in expected_information_gain
, perhaps it's worth abstracting / refactoring it out?
Looking at the Travis build failures, it seems as though the |
This should now work with #135 merged in. Resolved conflicts and re-ran tests. |
It would be nice for
bayes_risk
to vectorize over inputs to make use of any speed-ups that the likelihood might have along itsexpparams
axis. This PR is a stab at that. It seems to be working for the model I am working on, but needs a bit more testing.