Closed vdeltatto closed 11 months ago
Attention: 20 lines
in your changes are missing coverage. Please review.
Comparison is base (
564df28
) 80.22% compared to head (4402453
) 79.99%.:exclamation: Current head 4402453 differs from pull request most recent head fe9c8a5. Consider uploading reports for the commit fe9c8a5 to get more accurate results
Files | Patch % | Lines |
---|---|---|
dadapy/metric_comparisons.py | 64.10% | 14 Missing :warning: |
dadapy/_utils/metric_comparisons.py | 73.91% | 6 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi @vdeltatto, this all looks great to me! The only thing you might consider writing an additional test in order not to bring the total coverage below 80%. You should be able to check the Codecov report given above, see what lines are not covered, and design an efficient test in this respect
Hi @vdeltatto, this all looks great to me! The only thing you might consider writing an additional test in order not to bring the total coverage below 80%. You should be able to check the Codecov report given above, see what lines are not covered, and design an efficient test in this respect
Hi @AldoGl, thanks! I added a few tests to bring the coverage above 80%, but looking at the Codecov report I see that some lines which are actually covered by the last tests are shown as not covered. For example, the full function return_inf_imb_causality_conditioning
seems not covered but there is actually a test for it (test_return_inf_imb_causality_conditioning
). Do you have any clue why this happens?
Hi @vdeltatto, thanks for the great work and for the new tests. I have seen the problem you mentioned with Codecov. I honestly do not know why we get it, but I would not care too much. At this point I would just merge the PR!
@AldoGl Perfect, thanks!!
Proposed changes Added methods to speed up repeated grid searches in the causality test, when a loop is carried out over different values of tau, and to handle the presence of confounders / indirect links.
-New methods (
return_ranks_present_for_all_weights
andreturn_inf_imb_causality_input_rank
) in theMetricComparison
class to avoid recomputing the ranks in space A=(alpha*X(0),Y(0)) when only Y(tau) is changed -Added the possibility of computing distances with PBC in the causality functions (argumentsperiod_cause
,period_effect
andperiod_conditioning
); -Inserted a new test in ./tests/test_information_imbalance.py; -Modified file ./tests/rosslers_xtoy_trajectory.npy to speed up tests; -Modified methods (return_inf_imb_causality
and_return_inf_imb_causality_target_rank
) and new method (return_inf_imb_causality_conditioning
) to cope with third system Z, with a search grid over a 2D parameter space; -Added functions_return_period_present
,_return_period_mixed
and_compute_2d_grid
to simplify code in ./dadapy/_utils/metric_comparisons.py to simplify additions inMetricComparison
class.