-
Notifications
You must be signed in to change notification settings - Fork 48
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
Inference #50
Closed
Closed
Inference #50
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added gitignore to ignore vim swp files. New file inference.jl for exact, likelihood, gibbs, and loop belief (hopefully) Added include to BayesNets (and newline).
Changed likelihood to be more efficient than before. Added functions to generate bayesnets.
Added gibbs sampling method. Sort-of works, but huge memory complexity.
Have yet to add LBP. Tww versions of likelihood: pre-allocated and not Two versions of gibbs: full iteration and not Changed factors.jl summout to work with non-binary variables. (Hopefully its a valid change)
Code to generate BaeyesNets was moved to gen_bayes_nets.jl
Now random bayes nets can have nodes with no parents Added method to generate random inference scenario
Normalize uses builtin broadcasting Summout takes in both vectors and symbols Fixing problems with exact inference
Still need to fully test. LBP may be implemented
All inference methods are in their own files Added an ncategories(bn, symbol) method to simplify code. Keeping original inference.jl file for now . . .
Finalized all the algorithms, prettied up the code some, deleted the original file and added some more comments.
Added unified inference interface. Tentative move of exact and likelihood over.
Deleted other gibbs method. Added factors as "submodule" instead of separate package. Changing inference API. Still no docs of Factors
Integrated Factors into BayesNets. Mostly Undeleted gibbs since its important and useful More work on Inference interface to follow Can have only root node be parentless in rand_disc_bn
Exact inference using Factors occasionally is completely wrong. Still working on a debugging
Fixed logical error with join. Added tests (still need work). Added alias for union NodeNode or Vector of NodeNames Small change to tables sumout Renamed probability to potential, because ... I don't know
Started to convert LBP. Still using dicts. Now, not in parallel, but updating each node one at a time, with previous changes in that iteration factored in. This likely will not work ...
Gibbs and LBP still not providing correct (or senesical) results. Changes to (Gibbs)Inference object and associated tests.
More work to follow (maybe) on speeding up broadcast/join/reduce for factors.
Tests still missing edge cases. Broadcast, reduce, and join are still incredibly slow. ¯\_(ツ)_/¯
Changes how argument checking is done. Added convenience method for ncategories of cpd Updated ipynb docs Renamed (again) inference/ to Inference.
Excellent work. |
Merged indirectly by the Inference branch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New discrete factor type; added to package and not separate. Fixes #49
Factors slow in joining and broadcasting, so exact and loopy belief are fairly slow
I am still unsure how to approach #48 ...