Matrix Normalization in create_mats

86 views
Skip to first unread message

kcampbell

unread,
Jul 6, 2021, 4:25:01 PM7/6/21
to brainGraph-help
Hi Chris, 

I have two questions related to matrix normalization with the create_mats function in brainGraph. 

I have connectivity matrices produced from FSL's probtrackx2 ("fdt_network_matrix" and "waytotal" files for each of my subjects). I would also like to normalize matrices by brain size (i.e. atlas volume). 

First, I'm wondering if it's best to divide elements of each subject's connectivity matrix by atlas volume prior to entering matrices into create_mats, or is there a way to normalize by waytotal and atlas volume simultaneously with this function? 

Dividing each element of "fdt_network_matrix" by atlas volume is simple enough to do prior to entering into create_mats, but this then lead me to my next question on how exactly does create_mats normalize? In this context, it appears to be matrix element i, j ÷ waytotal of i ...but then how is P incorporated?

I took a look into the create_mats source script to find a call to another function called normalize_mats that takes the matrix (A), waytotal (divisor) and P as inputs....but I could not find any additional information on this function. Location: line 25 of create_mats in v. 3.0.2. 

Thanks for the clarification!  
Kayleigh

Chris Watson

unread,
Jul 7, 2021, 7:42:30 AM7/7/21
to brainGr...@googlegroups.com
The "P" argument is only used when you choose to normalize by "size". I believe this is done because otherwise larger regions will necessarily have a much higher number of streamlines, although it is possible this depends on the options used when running "probtrackx2".
I think "P" was *not* used for normalizing by "waytotal" because it is already "accounted for", in a sense. If you check the FSL archives there is probably a post by Saad explaining what to do about dividing by waytotal. So it may not be necessary to divide by *both* ROI size and waytotal.
Also note that the normalization is done by dividing by the *average* size of regions i and j (as I had found this to be the most common approach in the literature).
"normalize_mats" is an internal function and you can see what it does in the "create_mats.R" file (you can view it on GitHub).

Chris

--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/75d205e1-e49c-457b-8eeb-f9f5941e8f86n%40googlegroups.com.

kcampbell

unread,
Jul 7, 2021, 4:30:15 PM7/7/21
to brainGraph-help
Thanks for your quick response! I was able to access "normalize_mats" with: 
> View(brainGraph:::normalize_mats) 
(needed an extra colon to access the hidden script)

Yes, I see from "normalize_mats" that P is only used when normalizing by ROI size. I will take a look at the FSL Archives for further info, though, I do think I understand what you're in saying in that the number of samples is already "accounted for" in waytotal (in that waytotal for will increase proportionally with P).

Thanks again, 
Kayleigh
Reply all
Reply to author
Forward
0 new messages