Higher-order statistics for constructing centered edge functional connectivity.
2 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 2 matches
- [1] § METHODS › MSC Dataset ↔ data_example.py, lines 20 to 75 · score 0.64 · high motion frame, fMRI, regression, preprocessed, MSC · block
oscr:b:JG2QP3JCMRJC7-8· Report a mismatch - [2] § METHODS › MSC Dataset ↔ simulation.py, lines 1 to 85 · score 0.53 · high motion frame, regression, preprocessed, MSC · block
oscr:b:Y5ZZZW4B06HPE-K· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 134 lines · 4.1 KB · no license · 1 match
- from scipy import stats
- import scipy.io
- import numpy as np
- import matplotlib.pyplot as plt
- import seaborn as sns
- import pandas as pd
- import random
- import math
- from scipy.linalg import eigh
- import igraph
- from sklearn.metrics.cluster import contingency_matrix
- from matplotlib.collections import PathCollection
- from matplotlib.lines import Line2D
- from igraph import *
- from efc_corr_fcns import *
- from simulation_fcns import *
- # read in all subjects
- agg_ts_full = {}
- nrow_sub_scan = {} # accumulated # rows over scans of each subject
- for s in ["%.2d" % m for m in range(1, 11)]:
- agg_ts = np.empty((0, 200))
- nrow_sub_scan[s] = {}
- nrow = 0
- for j in ["%.2d" % i for i in range(1, 11)]:
- # data preprocessing based on read_in_data.m
- file = 'msc/fc/sub-MSC'+str(s)+'/sub-MSC'+str(s)+'.ses-func'+str(j)+'_task-rest_out.schaefer200-yeo17.regress_36pNS.mat'
- mat = scipy.io.loadmat(file)
- # get time series data
- ts = mat['parcel_time'][0][0]
- # zscore
- ts_zs = stats.zscore(ts, axis=0, ddof=1)
- num_frames, num_nodes = ts_zs.shape
- # deal with motion
- thr = 0.4 # drop frames with motion > thr
- dilate = 2 # drop if a low-motion frame is within 'dilate' frames of a high-motion frame
- minlen = 5 # keep low-motion frames that form contiguous sequences of at at least 'minlen'
- # make a mask of usable frames
- tmask = mat['tmask_all'][0][0]
- keep_frames0 = tmask < thr
- keep_frames = tmask < thr
- for i in range(num_frames):
- idx = range(i - dilate, i + dilate+1)
- idx = [x for x in idx if (x >= 0 and x < num_frames)]
- if any(keep_frames0[idx] == False):
- keep_frames[i] = False
- idx = np.where(keep_frames)[0]
- diff = idx - range(len(idx))
- unq = np.unique(diff)
- for k in range(len(unq)):
- kdx = diff == unq[k]
- if sum(kdx) < minlen:
- keep_frames[idx[kdx]] = False
- # cleaned data set
- ts_low_motion = ts_zs[keep_frames.flatten(),:]
- ts_low_motion_zs = stats.zscore(ts_low_motion, axis=0, ddof=1)
- nrow += ts_low_motion.shape[0]
- nrow_sub_scan[s][j] = nrow
- # aggregate fMRI data across all scans
- agg_ts = np.vstack([agg_ts, ts_low_motion_zs])
- agg_ts_full[s] = agg_ts
- # eFC & eFC-corr from aggregated data (subject 01-10)
- agg_efc_corr = {}
- for s in ["%.2d" % m for m in range(1, 11)]:
- agg_edge_ts = fcn_ets(agg_ts_full[s])
- agg_efc_corr[s] = fcn_eFC_corr(agg_edge_ts)
- file = 'hcp/hcp200.mat'
- mat = scipy.io.loadmat(file)
- label_num = mat['lab']
- system = np.array([e for tupl1 in mat['net'] for tupl2 in tupl1 for e in tupl2])
- dictionary = {A: B for A, B in zip(range(1,17), system)}
- label = np.vectorize(dictionary.get)(label_num)
- # compute matthews correlation matrix
- from sklearn.metrics import matthews_corrcoef
- def matthews_corrmat(df1, df2):
- corr_mat = np.zeros((df1.shape[1], df2.shape[1]))
- for i in range(df1.shape[1]):
- for j in range(df2.shape[1]):
- corr_mat[i,j] = matthews_corrcoef(df1.iloc[:, i], df2.iloc[:, j])
- return corr_mat
- # Kmeans for average eFC-corr sample estimations over 10 subjects
- from sklearn.cluster import KMeans
- avg_sample_efc_corr = np.zeros((num_edges, num_edges))
- for sub in ["%.2d" % m for m in range(1, 11)]:
- avg_sample_efc_corr += agg_efc_corr[sub]
- avg_sample_efc_corr = avg_sample_efc_corr/10.0
- p = avg_sample_efc_corr.shape[1]
- w, v = eigh(avg_sample_efc_corr, subset_by_index=[p-50, p-1])
- eivec_scale = v*1./np.max(abs(v), axis=0)
- df_eivec_scale = pd.DataFrame(eivec_scale)
- kmeans5 = KMeans(n_clusters=5)
- kmeans5.fit(df_eivec_scale)
- cluster5 = kmeans5.predict(df_eivec_scale)
- # example of projection matrix
- # supposed to relabel cluster based on avg regularized estimator
- p=200
- mat1 = np.zeros((p,p))
- mat1[np.triu_indices(mat1.shape[0], k = 1)] = cluster5
- mat1 = mat1 + np.transpose(mat1)
- np.fill_diagonal(mat1, 100)
- proj1 = np.zeros((p,np.max(cluster5)+1))
- for i in np.arange(np.max(cluster5)+1):
- mask1 = mat1 == i
- proj1[:,i] = np.sum(mask1,1)/(p-1)
data_example.py at commit d66ca35, no license · at the source
Overview
- Department of Statistics, University of Michigan, Ann Arbor, MI, USA
- Department of Psychiatry, University of Michigan, Ann Arbor, MI, USA
- Department of Biostatistics, Harvard University, Boston, MA, USA
- Department of Neuroscience, University of Minnesota, Minneapolis, MN, USA
Abstract
Functional connectivity is often constructed to understand functional organizations in neural systems, where the brain regions and their pairwise interactions are viewed as nodes and edges, respectively. In practice, functional connectivity is commonly estimated via the correlation of pairs of brain regions. One limitation is that the correlation coefficient captures only the pairwise linear dependence relationship between pairs of nodes and may fail to capture complex higher-order relationships. Recently, a novel concept known as edge-centric functional connectivity (eFC) has been introduced to measure interactions between pairs of edges based on the cofluctuation of two nodal time series, offering a new perspective for understanding brain networks. Nevertheless, eFC considers the absolute levels of edge time series, that is, their mean values, in estimation. If the parameter of interest is the covariation between a pair of edges, incorporating mean values of edge time series can introduce bias or deviation, resulting in a skewed estimation. In this manuscript, we propose an alternative approach to estimate the unbiased covariation between pairs of edges, termed centered edge functional connectivity (ceFC), with theoretical foundations. We demonstrate that the proposed estimator is consistent with a sufficient sample size or number of time frames. Additionally, we develop a multiple hypothesis testing framework with a controlled false discovery rate to evaluate the strength of the unbiased covariation among edges. Furthermore, we employ thresholding to obtain a thresholded estimator that has been shown to converge to the true ceFC matrix in high-dimensional settings in which the number of nodes is much larger than the number of samples or time frames. We validate the finite sample performance of the proposed methods via numerical studies and a data application using the Midnight Scan Club dataset.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.
Junting-Wang/centered-eFC
d66ca356d50fd70215521d25f8ce497bc3491d2c, 21 April 2025Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
7 files
- data_example.py, Python, 134 lines, 1 match
- efc_corr_fcns.py, Python, 137 lines
- simulation.py, Python, 135 lines, 1 match
- simulation_fcns.py, Python, 209 lines
- test_stat_fcns.py, Python, 365 lines
- test_stat_simulation.py, Python, 68 lines
- README.md, Text, 3 lines
Code availability
Code for ceFC and its related computation is available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 6 scripts, each with its path and the digest of its content;
- 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- openneuro:ds000224, at OpenNeuro; found in “DATA AVAILABILITY”
Data availability
MSC data are available on OpenNeuro at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 4 keywords, 100 references.
Cite
This paper
Wang, J., Jo, Y., Lu, J., Betzel, R., Zhu, J., & Tan, K. M. (2026). Higher-order statistics for constructing centered edge functional connectivity. Network neuroscience (Cambridge, Mass.), 10(3), 706-737. https://
BibTeX
@article{wang2026higher,
author = {Wang, Junting and Jo, Youngheun and Lu, Junwei and Betzel, Richard and Zhu, Ji and Tan, Kean Ming},
title = {{Higher-order statistics for constructing centered edge functional connectivity}},
journal = {Network neuroscience (Cambridge, Mass.)},
year = {2026},
month = jul,
volume = {10},
number = {3},
pages = {706--737},
publisher = {MIT Press},
issn = {2472-1751},
doi = {10.1162/
url = {https://
pmid = {42529641},
pmcid = {PMC13418521}
}
RIS
TY - JOUR
AU - Wang, Junting
AU - Jo, Youngheun
AU - Lu, Junwei
AU - Betzel, Richard
AU - Zhu, Ji
AU - Tan, Kean Ming
TI - Higher-order statistics for constructing centered edge functional connectivity
T2 - Network neuroscience (Cambridge, Mass.)
J2 - Netw Neurosci
PY - 2026
DA - 2026/
VL - 10
IS - 3
SP - 706
EP - 737
SN - 2472-1751
PB - MIT Press
DO - 10.1162/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1162/
"type": "article-journal",
"title": "Higher-order statistics for constructing centered edge functional connectivity",
"container-title": "Network neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Wang",
"given": "Junting"
},
{
"family": "Jo",
"given": "Youngheun"
},
{
"family": "Lu",
"given": "Junwei"
},
{
"family": "Betzel",
"given": "Richard"
},
{
"family": "Zhu",
"given": "Ji"
},
{
"family": "Tan",
"given": "Kean Ming"
}
],
"container-title-short":
"volume": "10",
"issue": "3",
"page": "706-737",
"DOI": "10.1162/
"PMID": "42529641",
"PMCID": "PMC13418521",
"ISSN": "2472-1751",
"publisher": "MIT Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
27
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1162/netn_a_00323 [code]
- Controversies and progress on standardization of large-scale brain network nomenclature.Journal: Network neuroscience (Cambridge, Mass.)In common: fMRI, systems, 19 references
- [2] doi:10.1016/j.nicl.2022.103139 [code]
- Altered brain network topology in children with auditory processing disorder: A resting-state multi-echo fMRI study.Journal: NeuroImage. ClinicalIn common: seaborn, scikit-learn, pandas, 3 other tools, fMRI, 16 references
- [3] doi:10.1038/s41467-026-75959-w [code]
- Charting higher-order models of brain function beyond pairwise interactions.Journal: Nature communicationsIn common: seaborn, scikit-learn, pandas, 3 other tools, 14 references
- [4] doi:10.1016/j.neuroimage.2022.119476 [code]
- BOLD cofluctuation 'events' are predicted from static functional connectivity.Journal: NeuroImageIn common: OpenNeuro ds000224, fMRI, 13 references
- [5] doi:10.1038/s41467-024-48781-5 [code]
- Systematic evaluation of fMRI data-processing pipelines for consistent functional connectomics.Journal: Nature communicationsIn common: scikit-learn, SciPy, Matplotlib, 1 other tool, fMRI, 13 references
- [6] doi:10.1038/s42003-023-05073-w [code]
- Intermediately synchronised brain states optimise trade-off between subject specificity and predictive capacity.Journal: Communications biologyIn common: seaborn, scikit-learn, pandas, 3 other tools, fMRI, systems, 11 references
- [7] doi:10.1126/sciadv.abq3851 [code]
- A spatiotemporal complexity architecture of human brain activity.Journal: Science advancesIn common: seaborn, pandas, Matplotlib, 1 other tool, 14 references
- [8] doi:10.1016/j.nicl.2022.103055 [code]
- Edge-centric analysis of stroke patients: An alternative approach for biomarkers of lesion recovery.Journal: NeuroImage. ClinicalIn common: seaborn, pandas, SciPy, 2 other tools, fMRI, 10 references
- [9] doi:10.1162/netn_a_00290 [code]
- From correlation to communication: Disentangling hidden factors from functional connectivity changes.Journal: Network neuroscience (Cambridge, Mass.)In common: seaborn, scikit-learn, pandas, 3 other tools, OpenNeuro ds000224, fMRI, systems, 8 references
- [10] doi:10.1038/s42003-023-05262-7 [code]
- Leading basic modes of spontaneous activity drive individual functional connectivity organization in the resting human brain.Journal: Communications biologyIn common: seaborn, scikit-learn, SciPy, 2 other tools, fMRI, 13 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 6 scripts, and 2 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:e0ba048da63d6691…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1162/netn.a.570)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1162/netn.a.570.svg
:target: https://openscicode.org/badge/doi/10.1162/netn.a.570
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1162/netn.a.570"><img src="https://openscicode.org/badge/doi/10.1162/netn.a.570.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
