TuringLang / Bijectors.jl

Implementation of normalising flows and constrained random variable transformations
https://turinglang.org/Bijectors.jl/
MIT License
196 stars 32 forks source link

Can't apply Bijectors.ordered to TDist() and MvTDist() #287

Closed boogiewoogit closed 10 months ago

boogiewoogit commented 10 months ago

These should both work, but don't:

julia> using Turing
julia> Bijectors.ordered(filldist(TDist(1),2))
ERROR: ArgumentError: ordered transform is currently only supported for unconstrained distributions.
julia> using Turing
julia> Bijectors.ordered(MvTDist(1,zeros(2),Matrix(I(2))))
ERROR: MethodError: no method matching bijector(::MvTDist)

In particular TDist is supported on the real line and therefore unrestricted in the sense of this package:

I have reported this to Turing.jl first, where it was identified that TDist's return type has the wrong support:

julia> bijector(TDist(1))
Bijectors.TruncatedBijector{Float64, Float64}(-Inf, Inf)
Red-Portal commented 10 months ago

Should have been addressed by #288 !