stecrotti / matrixproductbp.jl Goto Github PK
View Code? Open in Web Editor NEWMatrix Product Belief Propagation
License: Apache License 2.0
Matrix Product Belief Propagation
License: Apache License 2.0
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
Having a term
I suspect that the functions needed to define a RecursiveBPFactor
are not general enough if we want to do things like epidemics with heterogenous infection rates, or
Example: prob_xy(wᵢ::RecursiveBPFactor, yₖ, xₖ, xᵢ)
computes
Solution: re-define some functions including the index of k
in the list of neighbors of i
. That way we can access properties of wᵢ
.
Something like (up to the correct change of variables between {+1,-1} and {1,2}:
prob_xy(wᵢ::PlusMinus1GlauberFactor, yₖ, xₖ, xᵢ, idx_k) = ( yₖ != xₖ*wᵢ.J[idx_k] )
Since we introduced LoopVectorization:
┌ Warning: #= /home/crotti/.julia/packages/Tullio/NGyNM/src/macro.jl:1093 =#:
│ `LoopVectorization.check_args` on your inputs failed; running fallback `@inbounds @fastmath` loop instead.
│ Use `warn_check_args=false`, e.g. `@turbo warn_check_args=false ...`, to disable this warning.
└ @ MatrixProductBP.Models /home/crotti/.julia/packages/LoopVectorization/m1H1K/src/condense_loopset.jl:1148
Looks totally harmless, but we could take a look at it at some point
Make BP iterations for SimpleBPFactor
s even more efficient by performing "all-but-one" computation the smart way.
Side effect: get message to dummy neighbor for free
Here https://github.com/stecrotti/MatrixProductBP.jl/blob/457068104f03d3e3fc8bb4d787def316733740c6/src/Models/epidemics/sis_heterogeneous.jl#L39 for a given site, all factors at times fill
.
Maybe it would be good to have simple MPEM
s to store single node trajectory beliefs?
Get rid of square roots which are needed only because currently pair observations are placed half on outgoing messages and half on ingoing messages.
Will need to adjust pair beliefs accordingly.
Generalize to all those types of factors where
where
The BP update can be parallelized easily...
It would be good to see which parts of the code are covered by tests...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.