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

P vals for geo distance: permutation #8

Open
ajdneuro12 opened this issue Sep 16, 2020 · 2 comments
Open

P vals for geo distance: permutation #8

ajdneuro12 opened this issue Sep 16, 2020 · 2 comments

Comments

@ajdneuro12
Copy link

Hello,

I have two question. I saw somewhere that there is matlab code for the geodesic distance procedure. Would you be able to put me in touch with who I can contact for that? Also, do you have an example of the code (that you would be willing to share) about how to calculate the p values. I have code to do so for pearson based ID via permutation testing but wondering if you had it for geodesic distance. Thanks again!

Best,
Alex

@makto-toruk
Copy link
Owner

makto-toruk commented Sep 16, 2020

Hi Alex,

I'm attaching the Matlab code here. It's an early version so I recommend cross-checking it with the python code on this repository.
distFC_geo.zip

Regarding the p-values, I'm not sure what you mean by you have a code for Pearson but not for geodesic. We've described the procedure in detail in Section 2.8 in [0]. The implementation to obtain bootstrapped accuracy is at [1].

Once you have the bootstrapped accuracy for both geodesic and Pearson, comparisons were done as follows:
diff_score = (np.array(acc['geodesic']) - np.array(acc['pearson']))
/# acc['geodesic'] array of size number of bootstrap permutations
'''
fischer transform to compute actual tvalue
'''
dof = len(diff_score) - 1
diff_z_score = np.arctanh(diff_score)
null = 0
t = (np.mean(diff_z_score) - null)/np.std(diff_z_score)
p = 1 - stats.t.cdf(t, dof)

Best,
Manasij

[0] https://www.sciencedirect.com/science/article/pii/S1053811919309899
[1]

def _get_bootstrap_accuracy(self, file):

@ajdneuro12
Copy link
Author

ajdneuro12 commented Nov 23, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants