I noticed that due to the interpolation of the inverse cdf (actually of gamma.ppf(norm.cdf(x)) ) the application of the GammaOperator may return negative values if evaluated more than ca. 8 sigma away from 0 (in the latent space).
The interpolation you use is cubic and based on a table from -8.2 to 8.2 (I assume it is this range since the evaluation of the gamma.ppf(norm.cdf(x)) is not very stable beyond that point). Once you evaluate the operator beyond those limits the extrapolation of the cubic spline seems to cause issues.
I'm not sure if this qualifies as a bug since it quite far away from zero. However, I had quite some unlucky start values for my fit that causes some intermediate negative values during the fit.
One option would be to clip the values. But I wonder if there would be some simple asymptotic functions that could be used to extend the range.
Short summary:
Expected behavior: Only returns values great than 0
Observed behavior: Numerical approximation allows values smaller than 0
I noticed that due to the interpolation of the inverse cdf (actually of gamma.ppf(norm.cdf(x)) ) the application of the GammaOperator may return negative values if evaluated more than ca. 8 sigma away from 0 (in the latent space).
The interpolation you use is cubic and based on a table from -8.2 to 8.2 (I assume it is this range since the evaluation of the gamma.ppf(norm.cdf(x)) is not very stable beyond that point). Once you evaluate the operator beyond those limits the extrapolation of the cubic spline seems to cause issues.
I'm not sure if this qualifies as a bug since it quite far away from zero. However, I had quite some unlucky start values for my fit that causes some intermediate negative values during the fit.
One option would be to clip the values. But I wonder if there would be some simple asymptotic functions that could be used to extend the range.
Short summary:
Expected behavior: Only returns values great than 0
Observed behavior: Numerical approximation allows values smaller than 0