JuliaDynamics / ComplexityMeasures.jl

Estimators for probabilities, entropies, and other complexity measures derived from data in the context of nonlinear dynamics and complex systems
MIT License
53 stars 12 forks source link

New function `allprobabilities` #267

Closed Datseris closed 1 year ago

Datseris commented 1 year ago

This function makes it very easy to compare different input data under the same probabilities estimator. Before, it was very hard to compute e.g., KL divergence of the PMFs of different input data, because the elements did not follow the same ordering. Now it's easy!

codecov[bot] commented 1 year ago

Codecov Report

Merging #267 (edb09b6) into main (d3daec5) will increase coverage by 0.28%. The diff coverage is 100.00%.

:exclamation: Current head edb09b6 differs from pull request most recent head 1092d73. Consider uploading reports for the commit 1092d73 to get more accurate results

@@            Coverage Diff             @@
##             main     #267      +/-   ##
==========================================
+ Coverage   81.98%   82.27%   +0.28%     
==========================================
  Files          51       51              
  Lines        1299     1320      +21     
==========================================
+ Hits         1065     1086      +21     
  Misses        234      234              
Impacted Files Coverage Δ
src/probabilities.jl 93.87% <100.00%> (+4.59%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Datseris commented 1 year ago

We guarantee that outcome_space is sorted as developers. It is mandated by the API. Coincidentally, all existing implementations return it sorted anyways so I didn't have to change much!

Datseris commented 1 year ago

@kahaaga this is donezy , please approve or request changes!

Datseris commented 1 year ago

the histogram outcome space is not sorted by default, so I'm thinking what to do here.

Datseris commented 1 year ago

the solution was to make outcome_space for rectangualr binnings a vector instead of matrix or arbitrary array. that is probably overall better because outcomes also gives a vector. The only question is whether this broke anything in the TransferOperator

kahaaga commented 1 year ago

the solution was to make outcome_space for rectangualr binnings a vector instead of matrix or arbitrary array. that is probably overall better because outcomes also gives a vector. The only question is whether this broke anything in the TransferOperator

If the only thing that changed is that the return type changed from Matrix to Vector, then nothing should change in TransferOperator. The tests do pass too.