-
-
Couldn't load subscription status.
- Fork 16
Description
The idea of moment matching is that given a target distribution and a candidate distribution(s) we want to find the candidate(s) distribution(s) which moments closely match those of the target.
Moments could be passed as strings, with the default being mv. Not sure if we should have one function that accepts one target and one candidate (closer to pz.maxent), or if we should accept a list of candidates (similar to pz.mle).
Additionally, we could have a function for "quantile matching". Even when this function will be similar to the moment matching one, probably a good idea to keep them separated. Currently, we can do "quartile matching" by doing.
dist_gamma = pz.Gamma(2, 1)
dist_lognormal = pz.LogNormal()
pz.quartile(dist_lognormal, *dist_gamma.ppf([0.25, 0.5, 0.75]), plot=False)
dist_gamma.plot_pdf()
dist_lognormal.plot_pdf()We should have something more general (i.e. other quantiles), but I leave this here as a reference.