Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Add different thresholding options to connectivity analysis #41

Merged
merged 19 commits into from
Dec 2, 2021

Conversation

eurunuela
Copy link
Contributor

Closes #40 .

Changes proposed in this pull request:

  • Adds the option to threshold the edge time-series matrix with temporal and spatio-temporal criteria.

@@ -39,23 +39,15 @@ def test_threshold_ets_matrix():
dum_mat[2, 1] = 3
dum_mat2 = np.zeros((3, 3))
dum_mat2[2, 1] = 3
th_dum = ev.threshold_ets_matrix(dum_mat, [2], 2)
th_dum = utils.threshold_ets_matrix(dum_mat, thr=2, selected_idxs=2)
assert np.all(th_dum == dum_mat2)


def test_event_detection(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add the different rss options to the unittest testing so we don't lose coverage

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm planning on it. That's why this is still not ready for a review 😝

@codecov
Copy link

codecov bot commented Nov 30, 2021

Codecov Report

Merging #41 (4e3cb1c) into main (ba83d11) will increase coverage by 1.19%.
The diff coverage is 95.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   84.94%   86.13%   +1.19%     
==========================================
  Files          14       15       +1     
  Lines         777      815      +38     
==========================================
+ Hits          660      702      +42     
+ Misses        117      113       -4     
Impacted Files Coverage Δ
connPFM/connPFM.py 85.10% <ø> (ø)
connPFM/connectivity/connectivity_utils.py 93.93% <93.93%> (ø)
connPFM/connectivity/ev.py 95.00% <97.91%> (+6.00%) ⬆️
connPFM/cli/connPFM.py 100.00% <100.00%> (ø)

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 ba83d11...4e3cb1c. Read the comment docs.

@eurunuela eurunuela marked this pull request as ready for review December 1, 2021 10:32
@eurunuela
Copy link
Contributor Author

This is ready @vinferrer

Copy link
Member

@vinferrer vinferrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a few empty files that you commited that i believe are not necessary:
connPFM/connectivity/init.py
connPFM/debiasing/init.py
connPFM/deconvolution/init.py
connPFM/tests/init.py
Where you aware of them? what are they for? if they are being generated by the test, could you avoid it?

@vinferrer
Copy link
Member

I am not finished

@eurunuela
Copy link
Contributor Author

There is a few empty files that you commited that i believe are not necessary:
connPFM/connectivity/init.py
connPFM/debiasing/init.py
connPFM/deconvolution/init.py
connPFM/tests/init.py
Where you aware of them? what are they for? if they are being generated by the test, could you avoid it?

That was 100% intentional. I could not run the tests without that.

If you want to learn what they do, read this: https://stackoverflow.com/questions/448271/what-is-init-py-for

connPFM/tests/test_ev.py Outdated Show resolved Hide resolved
Copy link
Member

@vinferrer vinferrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @eurunuela. However, could you make changes from the comments i left?

connPFM/tests/test_ev.py Outdated Show resolved Hide resolved
@eurunuela
Copy link
Contributor Author

What do you think @vinferrer ? Are you happy with the changes?

Copy link
Member

@vinferrer vinferrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @eurunuela !!

@vinferrer vinferrer merged commit acda4c6 into SPiN-Lab:main Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The connectivity analysis should have different thresholding options
2 participants