Add a fallback distribution in GaussianNormalizer
in case the given distribution fails
#945
Labels
feature request
Request for a new feature
Problem Description
The GaussianNormalizer RDT estimates the shape of a marginal distribution using scipy, and then performs an inverse CDF transform to return a normal distribution.
As noted in SDV #2391, the requested scipy distribution may sometimes fail to converge for reasons that are outside of our control. In such cases, GaussianCopula typically falls back to using the normal distribution.
It would be nice if GaussianNormalizer could do the same. That way, any synthesizer that is dependent on it can proceed without crashing.
Expected behavior
Update the GaussianNormalizer fall back to using
'norm'
if something goes wrong. The fallback distribution cannot officially be changed by the user (via a parameter) but we should keep it as an attribute so it's accessible:fit
, we should use the_fallback_distribution
if anything goes wrong in scipy. If this happens, log it (logger.INFO) the same way that we do for Copulas.'beta'
) to the fallback distribution (eg.'norm'
)Additional Context
This would resolve the CopulaGANSynthesizer bug in SDV #2391.
The text was updated successfully, but these errors were encountered: