Copulas icon indicating copy to clipboard operation
Copulas copied to clipboard

Bivariate copulas don't scale automatically data for fit

Open marcperuz opened this issue 3 years ago • 7 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.

marcperuz avatar Dec 01 '22 10:12 marcperuz

I have the same issue, it appears that the dataset is expected to be uniformly distributed, which makes no sense mathematically speaking right?

adrmarty avatar Dec 05 '22 12:12 adrmarty

Same issue...

affoe avatar May 11 '23 10:05 affoe

This issue is still happening for me

arfogg avatar Apr 15 '24 15:04 arfogg