Comments (1)
After merging #28 we'll be in a situation where work on this can get started. The situation is still extremely simple right now and is primarily motivated by a need to simplify the current and very redundant "matching" for the supported negative-binomial samplers.
Currently, each negative-binomial sampler step is addressing a distinct part of a somewhat generalized negative-binomial regression model, but it's doing so in an overly rigid and piecemeal fashion. We need to make the logic of each distinct sampling step as independent and "reusable" as possible, and then add a means of incrementally identifying sample steps for each component in a model.
For example, we shouldn't need <model>_match
and <model>_gibbs
functions that just match/sample expansions/elaborations of essentially the same form of model(s). We don't want to have to write such functions for a negative-binomial model with a fixed dispersion term and one with a non-fixed dispersion term. Instead, we need to walk graphs and determine when/if sub-graphs match an implemented sample step, and, as a result, arrive at the kinds of combinations of sample steps that we currently have.
One basic requirement is a mapping between (sub-)model graph structures and their sample steps. At the moment, we could use the sub-graph "templates" that are used for unification (e.g. the etuple
s used in nbinom_horseshoe_match
) as keys in a map to their corresponding sample step constructors (e.g. nbinom_horseshoe_gibbs
). In other words, we can build a DB-like "index" out of the forms used for unification, and perhaps even find a fairly efficient approach for such unifications—e.g. similar to what's done in kanren.facts.Relation
.
There are two ways we can approach this and leverage existing code:
-
If we use
kanren
for the graph walking, then things like multiple-results handling,Relation
s, and some aspects of condition-checking + unification (e.g. constraints/disequality) are all immediately available; however, some basic aspects of the graph relations aren't very scalable and would need to be addressed almost immediately. -
If we use Aesara's graph rewriting framework, then we might have a more scalable approach; however, we would need to implement support for generating multiple rewrite results and the aforementioned "index"-like matching capabilities. As well, the relational framework would not be available, which means that we would still be reimplementing aspects of the relations we're ultimately using (e.g. applying one "direction" of an equality in one place and the opposite in another).
from aemcmc.
Related Issues (20)
- 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
- 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
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.