TransformVariables.jl icon indicating copy to clipboard operation
TransformVariables.jl copied to clipboard

inverse should ensure finite output

Open tpapp opened this issue 1 month ago • 1 comments

Currently, transformations may return infinity at the edges. Eg

julia> inverse(as(Real, 0.5, 1.0), 0.5)
-Inf

The whole code should be reviewed, and each transformation should throw a DomainError.

tpapp avatar Dec 08 '25 12:12 tpapp

I think TransformVariables shouldn't put such constrains on the arguments of inverse.

Clearly, non-finite values are not useful for frequentist or Bayesian estimation, but for pure evaluation of a model they may completely fine. For instance, in this example if the corresponding parameter domain of the model would be the closed interval [0.5, 1.0] and not just the open interval (0.5, 1.0), it seems fine to transform -Inf to 0.5 and evaluate the model with 0.5.

devmotion avatar Dec 08 '25 19:12 devmotion