Closed komabso closed 2 years ago
Hi Joseph,
do not worry, we are here to help! Ok, first of all, also the last two images don't look too much different from one another (but they do look quite different if you look at the demo). It looks like the lambdas you use is too small and the regularization might not have any effect; could you try changing your line#51 from x_nnls, _, _ = mit.get_coeffs()
to x_nnls, _, _ = mit.get_coeffs( get_normalized=False )
as it is in the COMMIT2 tutorial? This could explain your strange behavior.
Let us know, Ale
Thanks, Ale!
mit.get_coeffs( get_normalized=False )
, because the error below.Could you give me a way to solve it?
Although the questions are stupid somewhat, cut me some slack 🙇
Best, Joseph.
lambda
until we see that the density of the resulting connectome actually decreases, and we stop when we notice that too many bundles are remove (I mean, by inspecting the resulting tractograms with the help of an expert neurologist).Hello, Ale!
I used 1.4.6 version. I upgraded commit to latest version, then I could use mit.get_coeffs( get_normalized=False )
.
However, the result is the same even if lambda is 1. (COMMIT2 and COMMIT1's connectomes look like same.) 😢 Is maximum of lambda 1, isn't it?
Best, Joseph.
Lambda can take any value >= 0, and the higher it is, the sparser the matrices should be. Do you get meaningful results when running the COMMIT2 demo (using same data and code)?
When I re-run the COMMIT2 demo using latest commit version, the result of commit2 is sparser than commit1's. The binary connectomes are below.
Commit1 ->
Commit2 ->
Best, Joseph.
Dear Joseph,
I just repeated the COMMIT2 tutorial from scratch and I obtain the following connectomes:
whose density are, respectively, 0.66, 0.54 and 0.35. I suspect you have a problem in your installation, can you check on another computer/python installation if you can replicate the results of the tutorial?
Dear Ale.
Although I changed a server and installed commit at that place, the result looked like not meaningful... 😞
I might have made a wrong connectome matrix because I'm a newbie, so could you tell me the code for making the connectome? 🙏
Best, Joseph.
You can compute the connectomes and consider the weights estimated with COMMIT and COMMIT2 by using, for instance, the MRtrix command tck2connectome
(as done at the beginning of the tutorial in case of the raw tractogram) but using the option -tck_weights_in
to feed the streamline_weights.txt
estimated by COMMIT and COMMIT2, as follows:
os.system( 'tck2connectome -force -nthreads 0 -assignment_radial_search 2 -out_assignments COMMIT/Results_StickZeppelinBall_COMMIT1/fibers_assignment.txt -tck_weights_in COMMIT/Results_StickZeppelinBall_COMMIT1/streamline_weights.txt demo01_fibers_connecting.tck GM_1x1x1.nii.gz COMMIT/Results_StickZeppelinBall_COMMIT1/connectome.csv' )
and
os.system( 'tck2connectome -force -nthreads 0 -assignment_radial_search 2 -out_assignments COMMIT/Results_StickZeppelinBall_COMMIT2/fibers_assignment.txt -tck_weights_in COMMIT/Results_StickZeppelinBall_COMMIT2/streamline_weights.txt demo01_fibers_connecting.tck GM_1x1x1.nii.gz COMMIT/Results_StickZeppelinBall_COMMIT2/connectome.csv' )
I appreciate Ale!
Thanks to you, I found the difference between us.
When I ran tck2connectome
, I used demo01_fibers.tck
. However, you used demo01_fibers_connecting.tck
.
When I used demo01_fibers_connecting.tck
, I got same results as your demo. 😄
Because demo01_fibers.tck
and demo01_fibers_connecting.tck
look same in appearance, I was totally confused about what I have to use.
Thank you very much for your help. 👍
Best, Joseph.
Hi, @daducci . I'm sorry to bother you agian.
Unlike your demo (already mentioned, I duplicated it), when I applied commit2 to my data, it seemed that commit2 has no effect. According to your advice, I used connected_fibers.tck, but the binary connectomes looks like same. Left is commit1 and right is commit2.
The code which I used is below.
Could you see where the problem is?
Best, Joseph.
Hi Joseph,
no worries, happy to help! Did you try changing the lambda
for the regularization during the COMMIT2 call?
Yes. To decide proper lambda, I had a test where lambdas are [0, 5e-1, 5e-2, 5e-3, 5e-4, 5e-5, 5e-6].
But all connectomes looked like same.
As the figure is from 1 to 7, the lambda becomes smaller.
Best, Joseph.
Could you perform a last test using a very large lambda, for instance lambda=1e2
or lambda=1e5
?
Otherwise, the problem could be that you have a very high number of ROIs in your parcellation (around 400), and thus the regularization on bundles might not be very effective? Let's see the results of this test.
PS: in case, would it be possible for you to share (privately) your data so that we can perform some tests and understand better what is going on?
Okay. 👍
At first, I will do the test on your advice.
And then if there are same results, I will send my data to you. Please give me any contact way. (e.g. email, and so forth...)
Best, Joseph.
Hi!
Even though I ran the last test using very large lambdas (100, 1000, 10000), the results were same (no effect).
Here is the data file link. https://drive.google.com/drive/folders/1T2W9mWxjXZdCPPp3KhsSlfwMoQsj3qf2?usp=sharing
Could you check it out?
Best, Joseph.
Dear @komabso
I did a test using your dataset, the results of COMMIT2 and COMMIT1 are different, but similar.
Some notes that can explain the similitude of the results.
I am not familiar with the parcellation you are using, and I do not know if the density of the original connectome has to be reduced more than that.
Best regards Mario
Thank you for helping me even though you are busy!👍 It helped me a lot.
Best regards Joseph.
Hello.
Before processing all the data using COMMIT2, I tried to compare several values to determine which regularization lambda and fiber shift to use.
However, even if the value of Lambda is changed (applying anatomic priors), the results of the binary connectome of COMMIT1 and COMMIT2 seemed to be almost no difference, so I am inquiring about it.
The code What I used is below. test_lambda.txt
The first two pictures below are the binary connectome of COMMIT1 and COMMIT2 with fiber shift of 0.5 and lambda of 0.5 using one of the data I will process. The upper is COMMIT1 and the lower is COMMIT2.
The next two pictures are duplications that I followed the COMMIT2 tutorial that you wrote. The upper is COMMIT1 and the lower is COMMIT2.
From what I see, the results of your tutorial have difference (COMMIT2 is sparser) but the results of my data don't.
Could you give me some advices? It will be helpful! And I'm sorry to bother you again 😭
Best, Joseph.