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

Frank copula partial_derivative incorrectly documented #342

Open
rodrigoaragaosantos opened this issue Feb 15, 2023 · 2 comments
Open

Frank copula partial_derivative incorrectly documented #342

rodrigoaragaosantos opened this issue Feb 15, 2023 · 2 comments
Labels
bug There is an error in the code that needs to be fixed

Comments

@rodrigoaragaosantos
Copy link

Environment Details

Please indicate the following details about the environment in which you found the bug:

  • Copulas version: 0.8.0
  • Python version: 3.8.5
  • Operating System: Ubuntu 18.04.6 LTS

Error Description

Documentation for partial derivative of Frank Copula is described as partial derivative w.r.t. first entry, but it's implemented w.r.t. second entry.

Documentation reads: partial_derivative(U, V) = F( V | U )
But code implementation suggests partial_derivative(U, V) = F( U | V ) as seen as https://sdv.dev/Copulas/_modules/copulas/bivariate/frank.html#Frank.partial_derivative

Which exactly matches F( U | V ) as seen in:

image

which is itself
(self._g(U) * self._g(V) + self._g(U)) / (self._g(U) * self._g(V) + self._g(1))

according to the Frank.partial_derivative implementation

Steps to reproduce

@rodrigoaragaosantos rodrigoaragaosantos added the bug There is an error in the code that needs to be fixed label Feb 15, 2023
@ZZY2537
Copy link

ZZY2537 commented Mar 7, 2024

Hello, I also found the same problem, how did you modify it? This function exists in both Frank.partial_derivative implementation and bivarior.base.

@rodrigoaragaosantos
Copy link
Author

I didn't modify it.
I changed my code to use f(b,a) instead of f(a,b) and rolled with it

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
Projects
None yet
Development

No branches or pull requests

2 participants