help > RE: Cost threshold syntax
Sep 10, 2015  12:09 AM | Roger Beaty
RE: Cost threshold syntax
Thanks Alfonso---that's exactly what I was looking for.

Best,
Roger
Originally posted by Alfonso Nieto-Castanon:
Hi Roger,

A fixed-cost threshold simply keeps the highest/strongest N-percentile among the ROI-to-ROI connections, so if you want to threshold a correlation matrix Z by a fixed-cost threshold value v, you may for example use something like:

 mask = find(~eye(size(Z,1)));
 N = numel(mask);
 [~,in] = sort(Z(mask));
 in(1:N-round(N*v/2)*2) = [];
 Z_thresholded = nan(size(Z));
 Z_thresholded(mask(in)) = Z(mask(in));

(e.g. for v=.15 threhsold value, the Z_thresholded matrix will contain the Z values for the highest 15% connections, and NaN's for all the rest)

Let me know if this is what you were referring to
Best
Alfonso

Originally posted by Roger Beaty:
Hi Alfonso,

I'm trying to compute graph metrics (modularity) in another Matlab package and would like to use the same thresholded matrices derived from Conn. Do you have the syntax available to share that would compute the cost threshold on the first level ROI matrices? I know the thresholded matrices can be exported by Conn, but I'd like to explore weighted networks for this analysis.

Thanks,
Roger

Threaded View

TitleAuthorDate
Roger Beaty Sep 7, 2015
Alfonso Nieto-Castanon Sep 9, 2015
RE: Cost threshold syntax
Roger Beaty Sep 10, 2015