Bivariate copulas don't scale automatically data for fit
marcperuz opened this issue · comments
Environment Details
Copulas was installed through mamba in a dedicated environnment, with the conda-forge channel
- Copulas version:0.7.0
- Python version:3.7.12
- Operating System:Windows 10
Error Description
I'm trying to fit a raw 2D set of points with a bivariate copula model, reproducing the behavior of couplas.multivariate.Multivariate (but these classes may actually not be copulas?). It appears that the uniformization of the dataset between 0 and 1 is not handled by fit in the bivariate copulas. For a "user-friendly" experience, it would be great if all steps (distribution fit of X and Y samples, and fit of the copula) were transparent for the user. But maybe the current behavior is wanted?
Steps to reproduce
from copulas.datasets import sample_trivariate_xyz
import copulas.bivariate
data = sample_trivariate_xyz()
data = np.array(data[['x', 'z']])
bi_copula = copulas.bivariate.Gumbel()
bi_copula.fit(data)
ValueError: Marginal value out of bounds.
I have the same issue, it appears that the dataset is expected to be uniformly distributed, which makes no sense mathematically speaking right?
Same issue...
This issue is still happening for me