Comments (6)
Thanks for the clarification Bob and Junpeng! Given that order statistics is also something that can be a valid bijector, I was a little confused :).
@junpenglao, currently reviewing your PR. Apologies for any delays, since I am still familiarizing myself with the github review tools.
from probability.
Hi!
Just to clarify, given a vector [X1, ... X_n] this would be writing the order statistics X_(1), ... X_(n) in order, correct?
If I am understanding this correctly, this wouldn't be a bijection. Consider the vectors [2.1, 3., 4.], [3., 2.1, 4.] and [4., 3., 2.1]. All of them would map to [2.1, 3., 4.].
However, bijectors has been extended to a certain subclass of non-bijective transformations (e.g. there is an AbsoluteValue bijector), so I could see the same treatment being done here (because given a vector of length k, every preimage set is of cardinality k, up to multiplicity.).
from probability.
I misspoke and meant to say the preimage set is of size k! (every permutation).
from probability.
To generate an ordered vector y
from an unconstrained vector x
is set y[1] = x[1]
, and then y[2] = y[1] + exp(x[2])
, and so on. The log Jacobian is just sum(x[2: ])
. Then if you set y ~ normal(0, 1)
, you'll indeed see the order statistics just as if you'd taken an unconstrained vector x ~ normal(0, 1)
and sorted.
from probability.
So I understand this is for the bijective "ordered transform" described in section 35.5 of the Stan reference manual v. 2.17.1? I might give this a try, though it might take a while.
from probability.
@mrosenkranz I actually just sent a PR implementing the ordered transformation tensorflow/tensorflow#18647.
And yes that's the same as in Stan (manual 2.17.1) and PyMC3 (WIP PR).
from probability.
Related Issues (20)
- tfd.Empirical raises an AttributeError with quantile()
- Cannot compute gradient of Weibull parameters on second iteration HOT 1
- Keras 3 breaks Tensorflow Probability upon import HOT 4
- Distributions are not independent for Empirical HOT 1
- Understanding the determinant Jacobian of SoftmaxCentered
- Normal Inverse Gaussian NaN Gradient HOT 10
- Distribution Output Cannot Be Passed to Keras Layers HOT 1
- Distribution Output is Incompatible with Keras Dense Layers HOT 7
- Can you give an example of Bayesian Vector Autoregression based on TFP
- Normal Inverse Gaussian Outputs Positive log_prob HOT 4
- JAX backend doesn't use `jax.tree_util` HOT 1
- Sample from a partially known TensorShape inside the train_step function of a keras subclassed model HOT 1
- How to add new data to the pretrained Structural Time Series model in Tensorflow
- TurncatedNormal gives wrong results sometimes HOT 4
- Dirichlet distribution sampling issue when jit_compile=True HOT 1
- AttributeError: 'SymbolicTensor' object has no attribute 'log_prob' when exporting train signature with `IndependentNormal` layer HOT 1
- Add Poisson quantile
- Computing log_prob for tfd.Sample() with a different number of samples
- TruncatedCauchy gives wrong results sometimes
- `_parameter_properties` is not implemented for `LinearGaussianStateSpaceModel`
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 probability.