nateosher / DIMPLE

MIT License
2 stars 1 forks source link

Added jsd + kld + tests #28

Closed nateosher closed 1 year ago

nateosher commented 1 year ago

It bears mentioning that my method gives different results than LaplacesDemon, but this is intentional. They seem assume that a distribution vector that contains zeroes is on the log-scale and exponentiate it. This does not seem ideal for our case, so I simply compute each respective distance limited to the support of both distributions. Other than that everything should be straightforward.

codecov[bot] commented 1 year ago

Codecov Report

Base: 51.01% // Head: 51.78% // Increases project coverage by +0.76% :tada:

Coverage data is based on head (663ea0b) compared to base (249c020). Patch coverage: 91.30% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #28 +/- ## ========================================== + Coverage 51.01% 51.78% +0.76% ========================================== Files 30 31 +1 Lines 590 672 +82 ========================================== + Hits 301 348 +47 - Misses 289 324 +35 ``` | [Impacted Files](https://codecov.io/gh/nateosher/DistDist/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [R/jsd.R](https://codecov.io/gh/nateosher/DistDist/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Ui9qc2QuUg==) | `91.30% <91.30%> (ø)` | | | [R/kld.R](https://codecov.io/gh/nateosher/DistDist/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Ui9rbGQuUg==) | `91.30% <91.30%> (ø)` | | | [R/lm\_dist.R](https://codecov.io/gh/nateosher/DistDist/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Ui9sbV9kaXN0LlI=) | `43.10% <0.00%> (-49.21%)` | :arrow_down: | | [R/QuantileDist.R](https://codecov.io/gh/nateosher/DistDist/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Ui9RdWFudGlsZURpc3QuUg==) | `100.00% <0.00%> (ø)` | | | [R/update\_metadata.R](https://codecov.io/gh/nateosher/DistDist/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Ui91cGRhdGVfbWV0YWRhdGEuUg==) | `100.00% <0.00%> (ø)` | | | [R/hello\_world.R](https://codecov.io/gh/nateosher/DistDist/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Ui9oZWxsb193b3JsZC5S) | | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.