pybdm
pybdm copied to clipboard
Add conditional_bdm to compute BDM(x|y)
- add
conditional_bdm(X,Y)
andtest_conditional_bdm
based on supplementary from Hernández-Orozco S, Zenil H, (2021) - add compute_f_of_intersect used in Coarse Conditional BDM
to compute
- add pytest mark for slow in
tox.ini
Codecov Report
Merging #16 (71461aa) into master (4bedea1) will decrease coverage by
1.86%
. The diff coverage is89.36%
.
@@ Coverage Diff @@
## master #16 +/- ##
==========================================
- Coverage 92.93% 91.07% -1.87%
==========================================
Files 16 16
Lines 863 896 +33
==========================================
+ Hits 802 816 +14
- Misses 61 80 +19
Impacted Files | Coverage Δ | |
---|---|---|
pybdm/options.py | 40.00% <0.00%> (ø) |
|
pybdm/utils.py | 91.30% <0.00%> (-2.18%) |
:arrow_down: |
pybdm/bdm.py | 94.00% <94.11%> (-0.19%) |
:arrow_down: |
pybdm/algorithms.py | 89.25% <100.00%> (-0.83%) |
:arrow_down: |
tests/conftest.py | 70.96% <100.00%> (+2.00%) |
:arrow_up: |
tests/test_bdm.py | 100.00% <100.00%> (ø) |
|
tests/test_partitions.py | 100.00% <100.00%> (ø) |
|
tests/test_perturbation.py | 100.00% <100.00%> (ø) |
|
pybdm/encoding.py | 72.00% <0.00%> (-20.00%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 4bedea1...71461aa. Read the comment docs.
Hi @nodtem66 and thanks for this contribution! I will merge it in the upcoming new release (hopefully around June/July this year). In the meantime I have an important question.
I see that in some of the tests you added you use PartitionCorrelated
. Is this necessary, that is, is correlated partition somehow instrumental for this new method you implemented (I have not yet read the paper)? I am asking because I plan to remove or at least deprecate the correlated partition from the next release as it is not really feasible to define normalized BDM properly in this case.
Thanks, @sztal. I look forward to seeing the next upcoming release.
For your question, I used the PartitionCorrelated
in testing because it looks similar to the result from supplementary. The author used StringPartition which is like the correlated partition, as shown in the following figure from the Wolfram notebook: "StringConditionalExperimentsV6.nb". The two test cases in test_bdm.py
actually came from this script.
So, I suggest either mark it deprecated
or throw the exception
when using with normalized BDM.