Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.
brainprep.interfaces.network_entropy¶
- brainprep.interfaces.network_entropy(network_files_regex, output_dir, entropy_threshold=12, dryrun=False)[source]¶
Comput enetwork entropy - “structure vs randomness” metric.
A commonly used metric to assess whether a connectivity matrix exhibits meaningful structure is the matrix entropy. Low entropy indicates a highly structured matrix, whereas high entropy suggests a random-like or unstructured pattern.
- Parameters:
- network_files_regexstr
A regular expression matching TSV files generated by
func_vol_connectivity. These files must contain regions as index and columns with connectivity values.- output_dirDirectory
Directory where a TSV file containing the mean correlation values is created.
- entropy_thresholdfloat
Quality control threshold applied on the entropy score. Default 12.
- dryrunbool
If True, skip actual computation and file writing. Default False.
- Returns:
- entropy_fileFile
A TSV file containing the network entropy for each subject/session/run. The table includes the columns
participant_id,session,run, andentropy, as well as a binaryqccolumn indicating the quality control result.
Notes
A
qccolumn is added to the output table. It contains a binary flag indicating whether the entropy score do not exceeds the threshold:qc = 1ifentropy < entropy_threshold, otherwiseqc = 0.