Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bivariate copulas don't scale automatically data for fit #335

Open
marcperuz opened this issue Dec 1, 2022 · 3 comments
Open

Bivariate copulas don't scale automatically data for fit #335

marcperuz opened this issue Dec 1, 2022 · 3 comments
Labels
bug There is an error in the code that needs to be fixed under discussion Issue is currently being discussed

Comments

@marcperuz
Copy link

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 marcperuz added bug There is an error in the code that needs to be fixed under discussion Issue is currently being discussed labels Dec 1, 2022
@adrmarty
Copy link

adrmarty commented Dec 5, 2022

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

@affoe
Copy link

affoe commented May 11, 2023

Same issue...

@arfogg
Copy link

arfogg commented Apr 15, 2024

This issue is still happening for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug There is an error in the code that needs to be fixed under discussion Issue is currently being discussed
Projects
None yet
Development

No branches or pull requests

4 participants