Copulas icon indicating copy to clipboard operation
Copulas copied to clipboard

Add from_theta and from_tau classmethods on Bivariate

Open ManuelAlvarezC opened this issue 6 years ago • 0 comments

Currently, the only supported behavior for Bivariate copulas is the following:

  1. Instantiate the class of the desired family.
instance = Bivariate('frank')
  1. Fit it with data, and set the internal parameters tau and theta.
instance.fit(X)

assert instance.tau is not None
assert instance.theta is not None
  1. Use the instance methods to access the statistical functions of the copula family for given parameter theta computed 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: A classmethod that receives the tau parameter, create a new instance, compute and set the theta parameter, set it as fitted and return it.

  • from_theta: A classmethod that receives the theta parameter, create a new instance, set theta and fitted attributes and return it.

ManuelAlvarezC avatar Feb 15 '19 13:02 ManuelAlvarezC