sbi icon indicating copy to clipboard operation
sbi copied to clipboard

Add logit transformation of the parameters

Open anastasiakrouglova opened this issue 9 months ago • 0 comments

🚀 Feature Request

Problem: numerical stability for some simulators

Sometimes, SBI gets stuck because of some numerical instability.

Solution

Implements a logit transformation on the conditioning variable bounded within a given interval (min_val, max_val), mapping it to the real line (-inf, inf). This transformation is useful for normalizing bounded data while ensuring numerical stability.

Instead of z_scoring the conditioning variable, one can now also logit-transform it. Allowing in some cases, a more stable evaluation with the rejection-sampling algorithm (if normalized posterior is required).

📌 Additional Context

I have had these issues before with SBI, and implementing a logit transformation helped resolve the numerical instabilities when working in low-data modes.

anastasiakrouglova avatar Mar 17 '25 17:03 anastasiakrouglova