Comments (3)
FYI: If we lift random/measurable variables through mixtures, we can enable some important closed-form posterior opportunities.
For example:
import aesara
import aesara.tensor as at
srng = at.random.RandomStream(4238)
I_rv = srng.bernoulli(0.5, name="I")
Z_1_rv = srng.gamma(10, 100, name="Z_1")
Z_2_rv = srng.gamma(1, 1, name="Z_2")
Z_rv = at.stack([Z_1_rv, Z_2_rv])
# Observation model
Y_rv = srng.poisson(Z_rv[I_rv], name="Y")
Conjugate updates are available between Y_rv
and the two Z_*_rv
, conditional on the values of I_rv
.
The model after lifting should be equivalent to the following:
Z_1_new_rv = srng.poisson(Z_1_rv, name="Z_1_new")
Z_2_new_rv = srng.poisson(Z_2_rv, name="Z_2_new")
# New observation model
Y_new_rv = at.stack([Z_1_new_rv, Z_2_new_rv])
Y_new_rv.name = "Y_new"
The Z_*_new_rv
terms are now amenable to the Poisson-gamma conjugate rewrites.
from aemcmc.
We should split this off into a bunch of sub-issues for each (group of) closed-form posteriors we want to implement.
from aemcmc.
@ricardoV94, @rlouf, @zoj613, we should try to get this example working next. It's something that could be set up without too much effort and makes for a great combination of all our efforts.
from aemcmc.
Related Issues (20)
- Add `sample_prior`, `sample` and `sample_posterior_predictive` functions
- Add automatic Laplace approximation
- Use miniKanren to walk through mathematically equivalent model representations
- Gcc_flag issue with Max os HOT 1
- Dynamically generate lists in documentation
- Make sure `kanren` rewrites account for `SharedVariable.default_update`s
- Add AeMCMC logo to RTD?
- Demo automatic MAP estimation based on proximal operators
- Extend exact posteriors to condition on multiple observations HOT 7
- Assign FFBS sampler to variables in HMM models
- Refactor NUTS builder to use the new `logprob` interface
- Set up scheduled nightly builds
- Add a utility function to sample using `scan`
- Add examples to the README HOT 3
- Add a function to change the scan order of the sampling steps returned by `construct_sampler`
- Update the README with the new sampler interface
- Add standard HMC/NUTS defaults and options HOT 1
- `construct_sampler` does not support transformed observables HOT 1
- Logistic regression with time-varying coefficients: cannot construct sampler HOT 6
- Replacements need to apply to `SharedVariable.default_update` and `OpFromGraph`s
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aemcmc.