-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
In the pdf computation for Gaussian copula, the formula in the last row is wrong.
def get_pdf(self, u, v, param):
"""
# Computes the PDF
Parameters
----------
u, v : float
Values of the marginal CDFs
param : list
The correlation coefficient param[0] ∈ [-1,1].
Used to defined the correlation matrix (squared, symetric and definite positive)
"""
rho = param[0]
a = np.sqrt(2) * erfinv(2 * u - 1)
b = np.sqrt(2) * erfinv(2 * v - 1)
det_rho = 1 - rho**2
return det_rho**-0.5 * np.exp(-((a**2 + b**2) * rho**2 -2 * a * b * rho) / (2 * det_rho))
it should be 1/(2 * np.pi * np.sqrt(det_rho)) * np.exp(-((a2 + b2) * rho**2 -2 * a * b * rho) / (2 * det_rho))
Metadata
Metadata
Assignees
Labels
No labels