Comments (2)
@martinjankowiak as we discussed today, Funsor is currently incorrect when evaluating discrete+continuous mixtures. One possible solution path is to generalize log density to nonstandard reals, either by an Infinite
funsor or by adding funsor metadata in the form of an integer attribute .order
that propagates up to enclosing funsors. Semantically, only the highest-order terms are maintained. This .order
can be seen as the power of the unit infinite number in nonstandard analysis.
from funsor.
On further thought, I believe we could implement this as metadata on each funsor (similar to .bound
and .fresh
) consisting of bounds on the order of infinity, a tuple of integers .order = (lb, ub)
. This propagates up. Tensor
and Gaussian
will satisfy ub = lb
; Delta
will satisfy ub = lb + point.output.num_elements
since it is unknown whether the value is on- or off-peak. Compound funsors will propagate bounds to the top of the ast, thus decisions can be made such as:
@eager.register(Binary, LogaddexpOp, Funsor, Funsor)
def eager_mix_dominate(op, lhs, rhs):
if lhs.order.ub < rhs.order.lb:
return rhs # rhs dominates
if rhs.order.ub < lhs.order.lb:
return lhs # lhs dominates
return None # defer to default implementation
from funsor.
Related Issues (20)
- Delayed param in minipyro HOT 1
- [FR] `MagicBox` operator HOT 2
- Add array protocol dispatch methods to top-level Funsor class HOT 2
- Add Funsor (`Constant`) that is constant wrt to input variables HOT 1
- Dispatch to `Integrate(Delta, ...)` in `normalize_integrate_contraction` HOT 2
- `Delta` turns into `Binary` after `_alpha_unmangle` HOT 1
- Refactor Gaussian info_vec,precision from backend arrays to Funsors
- Gaussian funsor variable elimination HOT 7
- `NotImplementedError` when using `apply_optimizer` HOT 8
- `funsor.joint.eager_reduce_exp` behaves differently with `memoize`
- Switch to sqrt(prescision) representation in Gaussian?
- Increase test precision to float64? HOT 3
- Profile and speed up forward_filter_backward_sample
- FR example of model architecture search
- FR Thompson sampling example
- Failing tests with the new version of jax==0.3.10 HOT 1
- FR rules for (Gaussian + UniformPolygon).reduce(logaddexp)
- Feature Request: Add Support for TransformedDistribution with non-trivial event dimensions
- Tests fail HOT 3
- test_sample_partial test failure
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 funsor.