ComplexityMeasures.jl
ComplexityMeasures.jl copied to clipboard
Spatial bubble sort swaps
While working on the "accelerating research" section of the paper, I decided to do an experiment to see how efficient our APIs are.
I wanted to see how long it would take to generalize one of the existing outcome spaces to another spatial outcome space. The conclusion: it took roughly 2 hours, from conceiving the idea to finishing this PR.
Contents of this PR
Introduces a new spatial outcome space: SpatialBubbleSortSwaps
which encodes based on the "bubble sorting complexity" of the elements of hypervoxel windows. This works very similarly to SpatialOrdinalPatterns
and SpatialDispersion
, except the encoding is in terms of how many swaps are necessary to sort each window.
- [x] Implemented
codify
,counts_and_outcomes
,total_outcomes
andoutcome_space
. - [x] Pretty printing of the constructor (including tests).
- [x] Tests.
- [x] Referred to in docs.
- [x] Added change log entry
- [x] Minor version increment.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.83%. Comparing base (
faa492a
) to head (9241235
). Report is 16 commits behind head on main.
:exclamation: Current head 9241235 differs from pull request most recent head 7c221be
Please upload reports for the commit 7c221be to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## main #393 +/- ##
==========================================
- Coverage 89.29% 88.83% -0.47%
==========================================
Files 79 86 +7
Lines 2271 2463 +192
==========================================
+ Hits 2028 2188 +160
- Misses 243 275 +32
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Any outcome space that does delay embeddings is immediatelly generalizable to spatial data. We just need to alter codify
for it so that it does different embedding and construction of the vector of vectors (vectors of views in this case to be precise). But I guess we should leave this for another point. I would much rather finish the paper now. I am really in despearate stress to finish projects and publish them!
Shall we merge this too before we submit the paper, @Datseris?
In that case, I can merge with main and make sure that the measure-counting doc page also takes this measure into consideration.
Any outcome space that does delay embeddings is immediatelly generalizable to spatial data. We just need to alter codify for it so that it does different embedding and construction of the vector of vectors (vectors of views in this case to be precise). But I guess we should leave this for another point. I would much rather finish the paper now. I am really in despearate stress to finish projects and publish them!
Yes, this is generalisable. However, it is not a priority for me at the moment, so I think we should just merge this and leave generalisations for the future.
Sure, can you merge main
here and update changelog, as I guess everything will go under 3.5?
Sure, can you merge
main
here and update changelog, as I guess everything will go under 3.5?
Yep, this all goes in 3.5
right, but i can't merge duye to conflicts
right, but i can't merge duye to conflicts
Should be good now. Tests pass locally.