Repository navigation
ENH: more work on copula (deriv, classes) - #5076
Conversation
|
example that was in the |
|
Right now I only added the commit, I don't really know what the status is. |
|
2 travis fail because of an unrelated XPASS The derivatives of the archimedean transforms are used to compute the pdf in extreme value copulas don't have a full class with pdf yet. same pattern as using the archimedean in example script: trying out a few cases for tawn: this one looks closer to The EV copula transforms are functions without derivatives, while the Archimedean transforms are classes with methods to compute inverse transform and derivatives. |
|
multivariate > 2: a guess based on reading the code: another guess: It might be possible to create nested copulas in a similar way that wraps the current bivariate copula functions in loops. |
|
3 times the same functionality:
It looks like those define only the copula, using given (uniform) marginal values CopulaDistributionBivariate, CopulaDistribution combine the Copula class with the marginal distributions to get the distribution for the observed variables. |
|
generic idea (I don't know about the details, and didn't read up on fit methods) There are no params/args yet for the marginal distributions in the CopulaDistribution classes. We will need those if we want to estimate parametric marginal and parametric copula at the same time. If we use edf/empirical marginal distribution to estimate the copula parameters, then we only need the copula class and not a Distribution class. |
|
some quick browsing/search: the copula density is C12 is the second cross derivative of the copula f1, f2 are pdf of marginal distributions, so the CopulaDistribution classes need a marginal distribution instances that have both cdf and pdf methods. (edf is not a continuous distribution, so that will not work for getting a copula distribution density) |
|
a notebook based on the old script with addition of plots of extreme value copulas: (time to stop and go back to the scheduled program) |
|
This is essentially backwards compatible with the current master version. |
|
a reference in one of my old folders, survey for quickly checking some parts, with finance application to make a link to a different literature and PR:
This is identical to one of the covariance/correlation estimators in (outlier) robust |
|
Adding more half-finished stuff to the sandbox makes it harder it harder to identify the actually finished pieces that nom-sandbox relies on. Please let us institute a meaningful separation. |
|
If someone volunteers to work on code, then I help. Once we have unit tests, it can move out of the sandbox, after adding docstring and a bit of cleanup. |
|
This obviously doesn’t belong outside of the sandbox. Stats.diagnostic and multicomp code that is used outside sandbox belongs outside. We all know you don’t care about “prettiness” (AKA “bug prevention”) but you could avoid actively hampering the process and just empower Kevin to handle stuff you don’t care about. |
|
prettiness is only marginally related to bug prevention, unit tests are the main tool for that. (I would have given Kevin commit rights a long time ago because he is one of the main maintainers of statsmodels, but I worry that in combination with you after one month I will not recognize nor find my way around the code base anymore.) |
And I look forward to the day when the test suite is reliable (#4966). Even then, the best tool is the Mark I Eyeball, and for that readability counts.
I'll consider it a win that this suggestion finally got a response.
Consider agreeing to reasonable limits on what a new committer is allowed to handle solo. e.g. CI, or Build, or docstrings, or tests, or "non-namespace-changing readability improvements that I don't want to bother with", or only modules with names containing the letter "r", or ...
If done correctly, the code layout would be self-explanatory (#4992). Regardless, the vast majority of recent PRs wouldn't change layout, and those that do are for the very good reason of isolating sandbox from non-sandbox (#4887). |
resurrecting copulas see #4046
the first commit is from 2011 and was never included in the statsmodels.sandbox version