Copulas
Copulas copied to clipboard
Add from_theta and from_tau classmethods on Bivariate
Currently, the only supported behavior for Bivariate copulas is the following:
- Instantiate the class of the desired family.
instance = Bivariate('frank')
- Fit it with data, and set the internal parameters
tauandtheta.
instance.fit(X)
assert instance.tau is not None
assert instance.theta is not None
- Use the instance methods to access the statistical functions of the copula family for given parameter
thetacomputed in the instance
instance.sample(5)
instance.cdf(W)
Considering that all of the pdf, cdf, ppf sample use only the theta parameter and that the tau parameter is only used to compute theta, we could add the following methods:
-
from_tau: Aclassmethodthat receives thetauparameter, create a new instance, compute and set thethetaparameter, set it asfittedand return it. -
from_theta: Aclassmethodthat receives thethetaparameter, create a new instance, setthetaandfittedattributes and return it.