sbi
sbi copied to clipboard
Adapt SNRE to new DensityEstimator abstraction
It would be good to create a RatioEstimator to use for SNRE methods, similar to DensityEstimator abstraction already implemented. The API and broadcasting should be similar, so possibly this should be handled in a parent Estimator class (see #966)
I will take a look at this and formulate some ideas.
The purpose of the layer is to:
- compute the loss
- wrap the ratio estimate (for example for weighing it)
- embedding functions for both theta and x (subsuming
StandardizeInputs#1036) - provide a function to combine embed_theta(theta) and embed_x(x) into a single tensor.
Non-goals:
- introduce methods to approximate ratios of normalized distributions as in torch-mist here
Progress:
- [x] Change classifier_nn helper function to return new Ratio Estimator Class
- [x] Integrate new interface into SNRE base classes.
Note: this will address the ratio aspect of #957 .
this is being updated to reflect the goals of #1041 and #1046
solved with #1097