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

Hyper Laplace Distribution #193

Open
ZhuofanXie opened this issue Sep 25, 2020 · 1 comment · May be fixed by #194
Open

Hyper Laplace Distribution #193

ZhuofanXie opened this issue Sep 25, 2020 · 1 comment · May be fixed by #194

Comments

@ZhuofanXie
Copy link

ZhuofanXie commented Sep 25, 2020

  • Copulas version: v0.3.4.dev0
  • Python version: 3.7
  • Operating System: macOS Catalina 10.15.6

Description

Implement Hyper-Laplace distribution

@ZhuofanXie
Copy link
Author

ZhuofanXie commented Sep 25, 2020

The hyper-laplacian distribution is realized through a wrapper around the gamma distribution provided by scipy, where the mathematical relation between hyper-laplacian and gamma distributions is as the following:

  • For a random variable x satisfying a hyper-laplacian distribution with parameter k and alpha, its density p_x(x) is proportional to exp(-k|x|^alpha). Hence p_{|x|^alpha}(y = |x|^{alpha}) is proportional to exp(-ky)y^{1/alpha - 1}, which is a gamma random variable with shape parameter 1/alpha and scale parameter 1/k.

  • Finally, the fitting method is realized by matching the theoretical mean and variance of abs(x) with the empirical mean and variance. Specifically, we have E(|x|) = Gamma(2/alpha)/(Gamma(1/alpha)*k^{1/alpha}), and E(x^2) = Gamma(3/alpha)/(Gamma(1/alpha)*k^{2/alpha}). And we solve the equations using Newton’s method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant