[ENH] add explicit energy computations to 10 distributions#803
Open
sakun15 wants to merge 1 commit intosktime:mainfrom
Open
[ENH] add explicit energy computations to 10 distributions#803sakun15 wants to merge 1 commit intosktime:mainfrom
sakun15 wants to merge 1 commit intosktime:mainfrom
Conversation
- HalfNormal: numerical CDF integration via 2∫F(1-F)dt - HalfLogistic: numerical CDF integration via 2∫F(1-F)dt - Erlang: numerical CDF integration, promotes energy to capabilities:exact - Fisk (log-logistic): numerical CDF integration, promotes energy to exact - LogLaplace: numerical CDF integration - SkewNormal: numerical CDF integration, promotes energy to exact - BurrXII: numerical CDF integration - BurrIII: numerical CDF integration (uses BurrXII with d=1) - FatigueLife: numerical CDF integration - GeneralizedPareto: numerical CDF integration with adaptive bounds All implementations use scipy.integrate.quad with 2∫F(1-F)dt for _energy_self and ∫|t-x|f(t)dt for _energy_x, replacing the default Monte Carlo approximation with deterministic numerical integration. Verified against Monte Carlo simulation (n=200k-500k): all within 2%. All 320 pytest energy tests pass. Closes sktime#267
Author
|
@fkiraly @felipeangelimvieira Sir can you please review my PR. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Closes #267 (partial — adds energy for 10 distributions that previously used Monte Carlo approximation).
Adds
_energy_selfand_energy_xmethods to:HalfNormal— numerical CDF integration (2∫F(1-F)dt)HalfLogistic— numerical CDF integrationErlang— numerical CDF integration (promoted from approx to exact)Fisk(log-logistic) — numerical CDF integration (promoted from approx to exact)LogLaplace— numerical CDF integrationSkewNormal— numerical CDF integration (promoted from approx to exact)BurrXII— numerical CDF integrationBurrIII— numerical CDF integrationFatigueLife— numerical CDF integrationGeneralizedPareto— numerical CDF integration with adaptive boundsAll use
scipy.integrate.quadwith deterministic quadrature, so all distributions are now listed undercapabilities:exact.Verification
Checked against Monte Carlo (n=200k-500k): all implementations within 2% of MC estimate.
All 320
test_methods_scalar[*-energy-*]pytest tests pass.