EEG Biomarkers for Affective Disorders Diagnosis: An Evaluation and Validation Study.
The 6 matches
- [1] § The Biomarkers › Time and Frequency Domain › Power Spectral Density (PSD) ↔ get_segment.py, lines 31–58 · score 0.80 · 0.5–4 Hz, 30–50 Hz, frequency bands, 4–8 Hz, delta, power
- [2] § Empirical Validation and Analysis › Evaluation of Biomarker Effectiveness ↔ extract_features_examples.py, lines 50–111 · score 0.78 · detrended fluctuation, SamEn, approximate entropy, sample entropy, AppEn, DFA
- [3] § Empirical Validation and Analysis › Dataset and Preprocessing › B‐SNIP 1 Dataset ↔ process.py, lines 11–28 · score 0.68 · notch filter, bad channels, M1, M2, 0.1 Hz, 50 Hz
- [4] § Empirical Validation and Analysis › Analysis of Time‐Frequency Biomarkers › Power Spectral Density (PSD) ↔ get_segment.py, lines 31–58 · score 0.67 · Power spectral density, frequency bands, delta, beta, theta, alpha
- [5] § Empirical Validation and Analysis › Analysis of Complexity‐Related Biomarkers ↔ extract_features_examples.py, lines 50–111 · score 0.59 · Higuchi fractal dimension, detrended fluctuation, DFA, HFD
- [6] § The Biomarkers › Time and Frequency Domain › Power Spectral Density (PSD) ↔ extract_features_examples.py, lines 1–47 · score 0.53 · 30–50 Hz, 4–8 Hz, beta, theta, alpha, 30 Hz
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 226 lines · 9.2 KB · no license · 3 matches
- import os
- import scipy.io as sio
- from main_preprocessing import Preprocessing
- import mne
- import pandas as pd
- import lmdb
- import pickle
- import numpy as np
- import antropy as ant
- from mi import compute_mi
- from statsmodels.tsa.stattools import grangercausalitytests
- from tqdm import tqdm
- from connectivity import plv_connectivity,pli_connectivity,ccf_connectivity,coh_connectivity,icoh_connectivity
- from mne_connectivity import spectral_connectivity_epochs
- from torcheeg import transforms
- from extract_feature import extract_connectivity,data_append
- from lds import smooth_feature
- import warnings
- import mne_microstates
- from mne_connectivity import spectral_connectivity_epochs,vector_auto_regression
- warnings.filterwarnings('ignore')
- # %%
- root_dir = '/data0/cyn/DEAP/data_preprocessed_python'
- files = [file for file in os.listdir(root_dir)]
- files = sorted(files,key=lambda x: (int(x[1:3])))
- files_dict = {
- 'train':files[:32]
- # 'val':files[20:21],
- # 'test':files[20:21],
- }
- eeg_duration = 1
- baseline_duration = 3 # 秒
- all_fre ={"theta": [4, 8],
- "alpha": [8, 14],
- "beta": [14, 30],
- "gama": [30, 50]}
- t1 = transforms.BandSampleEntropy(band_dict=all_fre,sampling_rate=128,R=0.2)
- t2 = transforms.BandHiguchiFractalDimension(band_dict=all_fre,sampling_rate=128)
- t3 = transforms.BandHjorth(band_dict=all_fre,sampling_rate=128,mode='mobility')
- t4 = transforms.BandHjorth(band_dict=all_fre,sampling_rate=128,mode='complexity')
- t = transforms.BandDetrendedFluctuationAnalysis(band_dict=all_fre,sampling_rate=128)
- ######################################################################
- # extract features method
- ######################################################################
- # "AppEn":transforms.BandApproximateEntropy(band_dict=all_fre,sampling_rate=128),
- # "SamEn":transforms.BandSampleEntropy(band_dict=all_fre,sampling_rate=128,R=0.2),
- # "HFD":transforms.BandHiguchiFractalDimension(band_dict=all_fre,sampling_rate=128),
- # "DFA":transforms.BandDetrendedFluctuationAnalysis(band_dict=all_fre,sampling_rate=128),
- # "hjc":transforms.BandHjorth(band_dict=all_fre,sampling_rate=128,mode='complexity'),
- # "hjm":transforms.BandHjorth(band_dict=all_fre,sampling_rate=128,mode='mobility'),
- # "DE":transforms.BandDifferentialEntropy(band_dict=all_fre),
- # "micro_state":mne_microstates.segment(one, n_states=4,
- # random_state=0,
- # return_polarity=True),
- # "GC":compute_gc_matrix,
- # "PLV":extract_connectivity(data,"plv"),
- # "PLI":extract_connectivity(data,"pli"),
- # "cohy":spectral_connectivity_epochs(data=sample1,method='cohy',sfreq=128,fmin=4,fmax=50,mode='multitaper',faverage=True),
- # "imcoh":spectral_connectivity_epochs(data=sample1,method='imcoh',sfreq=128,fmin=4,fmax=50,mode='multitaper',faverage=True),
- # "dpli":spectral_connectivity_epochs(data=sample1,method='dpli',sfreq=128,fmin=4,fmax=50,mode='multitaper',faverage=True),
- # "SpecEn":transforms.BandSampleEntropy(band_dict=all_fre,sampling_rate=128),
- # "kur":transforms.BandKurtosis(),
- # "ske":transforms.BandSkewness(),
- # "PSD":mne.time_frequency.psd_array_multitaper(sample,128,fmin=4,fmax=50),
- # "PermEn":ant.perm_entropy(),
- # "MI":get_MI(),
- # "PFD":transforms.BandPetrosianFractalDimension(band_dict=all_fre,sampling_rate=128),
- # "SVDEn":transforms.BandSVDEntropy(band_dict=all_fre,sampling_rate=128),
- # "CCF":extract_connectivity(data,"ccf"),,
- # "coh":spectral_connectivity_epochs(data=sample1,method='coh',sfreq=128,fmin=4,fmax=50,mode='multitaper',faverage=True)
- def compute_gc_matrix(data, maxlag=2, verbose=False):
- """
- 计算 Granger 因果矩阵 (num_channels x num_channels)
- 参数:
- - data: ndarray, shape (num_channels, n_times)
- - maxlag: int, VAR模型的最大滞后阶数
- - verbose: 是否打印grangercausalitytests的详细结果
- 返回:
- - gc_matrix: ndarray, shape (num_channels, num_channels)
- gc_matrix[i, j] 表示 通道i → 通道j 的GC强度
- """
- num_channels, n_times = data.shape
- gc_matrix = np.zeros((num_channels, num_channels))
- for i in range(num_channels):
- for j in range(num_channels):
- if i == j:
- continue # 自因果设为0
- # 构造输入格式 (T, 2),第0列是被预测的序列,第1列是潜在的因果序列
- test_data = np.vstack([data[j], data[i]]).T
- try:
- results = grangercausalitytests(test_data, maxlag=maxlag, verbose=verbose)
- # 提取某个指标作为 GC 强度,这里用 maxlag 阶的 F 检验的 p-value
- p_value = results[maxlag][0]['ssr_ftest'][1]
- gc_matrix[i, j] = -np.log(p_value + 1e-10) # p 越小,因果越强(取负log方便可视化)
- except Exception as e:
- print(f"GC计算失败: {i}->{j}, 错误: {e}")
- gc_matrix[i, j] = 0
- return gc_matrix
- def get_MI(data):
- target=[]
- for i in range(40):
- target.append([0 for i in range(40)])
- for i in range(40):
- for j in range(i,40):
- mi = compute_mi(data[i], data[j],20)
- target[i][j]=mi
- target[j][i]=mi
- return np.array(target)
- all_de=[]
- all_plv=[]
- all_lds_de=[]
- all_lds_plv=[]
- all_label=[]
- all_data=[]
- num=0
- # path = '/data0/violin/projects/szbd_practice/szbd_dataset_eeg_64_noICA'
- # files = os.listdir(path)
- # dict_num = {}
- # for file in files:
- # s = file.split('-')
- # if s[-3]!='RestEyesOpen' and s[-3]!='RestEyesClosed':
- # continue
- # name = s[-3]+"_"+s[-2]
- # if not name in dict_num.keys():
- # dict_num[name]=1
- # else:
- # dict_num[name]+=1
- # print(dict_num)
- # assert(1==0)
- for files_key in files_dict.keys():
- for file in tqdm(files_dict[files_key]):
- # num+=1
- # if num<=9:
- # continue
- # print(files_dict[files_key])
- # assert(1==0)
- # print(file[:-4])
- # assert(1==0)
- data_path = os.path.join(root_dir, file)
- data_label = pickle.load(open(data_path, 'rb'), encoding='latin1')
- data = data_label['data']
- data = data.reshape(40,40,63,128)
- data = data.transpose(0, 2, 1, 3)
- label_valence = data_label['labels']
- baseline_values = np.mean(data[:, :baseline_duration, :, :], axis=1) # shape (40, 40, 128)
- data = data - baseline_values[:, np.newaxis, :, :]
- data = data[:,baseline_duration:]
- # data = data.transpose(0,2,1,3)
- # print(data.shape)
- # assert(1==0)
- sub_de=[]
- sub_plv=[]
- de_lds=[]
- plv_lds=[]
- sub_label=[]
- sub_data=[]
- for i in tqdm(range(data.shape[0])):
- samples = data[i]
- # if label_valence[i]>5:
- # label_valence[i]=0
- # else:
- # label_valence[i]=1
- session_de=[]
- session_plv=[]
- session_label=[]
- session_data=[]
- # print(data.shape[1],'fffffffff')
- # assert(1==0)
- for j in range(data.shape[1] // eeg_duration):
- sample = samples[eeg_duration * j:eeg_duration * (j + 1)][0]
- maps = []
- for x1 in sample:
- tem = ant.perm_entropy(x1, normalize=True)
- maps.append(tem)
- maps = np.array(maps)
- ske = np.expand_dims(maps,axis=-1)
- # print(maps.shape)
- # assert(1==0)
- # plv = extract_connectivity(sample,'pli')
- session_de=data_append(session_de,ske)
- # session_plv=data_append(session_plv,maps3)
- # session_label=data_append(session_label,label_valence[i])
- # session_data=data_append(session_data,maps2)
- # tem_plv=LDS_plv(session_plv)
- # tem_de=session_de
- # tem_de=tem_de.transpose(0, 2, 1)
- # tem_de=smooth_feature(tem_de)
- # tem_de=tem_de.transpose(0, 2, 1)
- sub_de=data_append(sub_de,session_de)
- # sub_plv=data_append(sub_plv,session_plv)
- # de_lds=data_append(de_lds,tem_de)
- # plv_lds=data_append(plv_lds,tem_plv)
- # sub_label=data_append(sub_label,session_label)
- # sub_data=data_append(sub_data,session_data)
- # print(sub_de.shape,de_lds.shape)
- # assert(1==0)
- # all_lds_de=data_append(all_lds_de,de_lds)
- # all_lds_plv=data_append(all_lds_plv,plv_lds)
- # np.save('/data0/lyt/emotion/seed/DEAP/gc_{}.npy'.format(file[:-4]),all_de)
- all_de=data_append(all_de,sub_de)
- # all_plv=data_append(all_plv,sub_plv)
- # all_label=data_append(all_label,sub_label)
- # all_data=data_append(all_data,sub_data)
- # np.save('/data0/lyt/emotion/seed/DEAP/plvLDS.npy',all_lds_plv)
- # np.save('/data0/lyt/emotion/seed/DEAP/deLDS4band.npy',all_lds_de)
- # np.save('/data0/lyt/emotion/seed/DEAP/dpli.npy',all_plv)
- np.save('/data0/lyt/emotion/seed/DEAP/permen.npy',all_de)
- # np.save('/data0/lyt/emotion/seed/DEAP/label.npy',all_label)
- # np.save('/data0/lyt/emotion/seed/DEAP/imcoh.npy',all_data)
- print(all_de.shape)
extract_features_examples.py at commit e33abd2, no license · at the source
Overview
- State Key Laboratory of Brain‐Machine Intelligence, Zhejiang University, Hangzhou, China
- College of Computer Science and Technology, Zhejiang University, Hangzhou, China
- MOE Frontier Science Center for Brain Science and Brain‐Machine Integration, Zhejiang University, Hangzhou, China
- Department of Neurobiology, Affiliated Mental Health Center & Hangzhou Seventh People's Hospital, Zhejiang University School of Medicine, Hangzhou, China
Abstract
Electroencephalography (EEG) provides real‐time, dynamic insights into brain function, making it a valuable tool for the screening, diagnosis, and treatment of affective disorders. The use of EEG‐derived features as biomarkers for affective disorder diagnosis has attracted growing attention. In this work, we introduce 25 commonly used EEG features and categorize them into four domains: time‐domain, frequency‐domain, complexity, and connectivity. Each feature captures distinct aspects of emotional processing and serves as a potential biomarker for diagnosing affective disorders. To evaluate their diagnostic utility, we analyzed two independent resting‐state EEG datasets. The first dataset comprised 84 healthy controls, 62 patients with schizophrenia (SZ), 43 patients with schizoaffective disorder (SAD), and 32 patients with bipolar disorder (BD), while the second included 28 healthy controls and 32 patients with major depressive disorder (MDD). These features are extracted and used for classification, allowing us to identify biomarkers with strong discriminative power. Finally, we provide a comprehensive discussion on key issues in the field, including multimodal biomarker integration, challenges in EEG‐based diagnosis, variability in classification results, and factors influencing EEG feature extraction.
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 6 matches between paragraphs and lines of code.
yt-liu88/EEGBiomarkers-for-Affective-Disorders-Diagnosis
e33abd2c6713fc3fd3a4e2fe94f0fe705d260d1a, 2 September 2025Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
5 files
- extract_features_example
s.py , Python, 226 lines, 3 matches - get_segment.py, Python, 229 lines, 2 matches
- model_examples.py, Python, 1,025 lines
- process.py, Python, 35 lines, 1 match
- README.md, Text, 1 line
The paper's code and data availability statement is in the Data section.
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;
- 4 scripts, each with its path and the digest of its content;
- 6 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
No dataset and no data link were found in the paper.
Data Availability Statement
The data that support the findings of this study are openly available in National Institute of Mental Health (NIMH) Data Archive at https://
Reproduced under the paper's license (CC BY-NC), 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, 9 authors, 3 keywords, 13 MeSH terms, 3 funders, 91 references.
Cite
This paper
Zhao, S., Liu, Y., Wang, J., Zhang, R., Wang, Y., Jiang, H., Li, S., Li, T., & Pan, G. (2026). EEG Biomarkers for Affective Disorders Diagnosis: An Evaluation and Validation Study. Human brain mapping, 47(13), e70628. https://
BibTeX
@article{zhao2026eeg,
author = {Zhao, Sha and Liu, Yitian and Wang, Jiquan and Zhang, Ruizhe and Wang, Yilin and Jiang, Haiteng and Li, Shijian and Li, Tao and Pan, Gang},
title = {{EEG Biomarkers for Affective Disorders Diagnosis: An Evaluation and Validation Study}},
journal = {Human brain mapping},
year = {2026},
month = sep,
volume = {47},
number = {13},
pages = {e70628},
publisher = {Wiley},
issn = {1065-9471},
doi = {10.1002/
url = {https://
pmid = {42702788},
pmcid = {PMC13547600}
}
RIS
TY - JOUR
AU - Zhao, Sha
AU - Liu, Yitian
AU - Wang, Jiquan
AU - Zhang, Ruizhe
AU - Wang, Yilin
AU - Jiang, Haiteng
AU - Li, Shijian
AU - Li, Tao
AU - Pan, Gang
TI - EEG Biomarkers for Affective Disorders Diagnosis: An Evaluation and Validation Study
T2 - Human brain mapping
J2 - Hum Brain Mapp
PY - 2026
DA - 2026/
VL - 47
IS - 13
SP - e70628
SN - 1065-9471
PB - Wiley
DO - 10.1002/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1002/
"type": "article-journal",
"title": "EEG Biomarkers for Affective Disorders Diagnosis: An Evaluation and Validation Study",
"container-title": "Human brain mapping",
"author": [
{
"family": "Zhao",
"given": "Sha"
},
{
"family": "Liu",
"given": "Yitian"
},
{
"family": "Wang",
"given": "Jiquan"
},
{
"family": "Zhang",
"given": "Ruizhe"
},
{
"family": "Wang",
"given": "Yilin"
},
{
"family": "Jiang",
"given": "Haiteng"
},
{
"family": "Li",
"given": "Shijian"
},
{
"family": "Li",
"given": "Tao"
},
{
"family": "Pan",
"given": "Gang"
}
],
"container-title-short":
"volume": "47",
"issue": "13",
"page": "e70628",
"DOI": "10.1002/
"PMID": "42702788",
"PMCID": "PMC13547600",
"ISSN": "1065-9471",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
1
]
]
}
}
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/imag.a.1245 [code]
- Towards precision EEG connectomics: Evaluating the benefits of dense sampling.Journal: Imaging neuroscience (Cambridge, Mass.)In common: MNE-Connectivity, ICLabel, MNE-Python, 5 other tools, EEG, 3 references
- [2] doi:10.1002/hbm.70528 [code]
- Explainable AI Insights Into EEG Classification and Its Alignment to Neural Correlates.Journal: Human brain mappingIn common: MNE-Connectivity, ICLabel, MNE-Python, 6 other tools, EEG
- [3] doi:10.3390/s26134019 [code]
- NeuroStat: An Open-Source EEG Connectivity Platform for Randomised Controlled Trials.Journal: Sensors (Basel, Switzerland)In common: MNE-Connectivity, ICLabel, MNE-Python, 4 other tools, EEG, 1 reference
- [4] doi:10.1097/j.pain.0000000000004044 [code]
- No effect of rhythmic visual stimulation on experimental pain perception.Journal: PainIn common: MNE-Connectivity, ICLabel, MNE-Python, 5 other tools, EEG
- [5] doi:10.1186/s12967-026-08108-y [code]
- An explainable multimodal machine learning model for diagnosing disorders of consciousness: evidence from a large multicenter Chinese cohort.Journal: Journal of translational medicineIn common: MNE-Connectivity, ICLabel, MNE-Python, 3 other tools, EEG, 1 reference
- [6] doi:10.1002/mds.70348 [code]
- Electroencephalography-B
ased Clustering Reveals Robust Neurophysiological Subtypes in Parkinson's Disease. Journal: Movement disorders : official journal of the Movement Disorder SocietyIn common: ICLabel, MNE-Python, statsmodels, 5 other tools, EEG, 1 reference - [7] doi:10.1523/eneuro.0041-26.2026 [code]
- Ocular Speech Tracking Persists in Blindness, but Its Dynamics and Oculo-Cerebral Connectivity Depend on Visual Status.Journal: eNeuroIn common: MNE-Connectivity, MNE-Python, statsmodels, 5 other tools, 1 reference
- [8] doi:10.1007/s12021-026-09784-3 [code]
- Estimating Mutual Information and Pearson Correlation on Neural Evoked Responses.Journal: NeuroinformaticsIn common: MNE-Python, scikit-learn, pandas, 3 other tools, 3 references
- [9] doi:10.1038/s42003-026-10394-7 [code]
- Cognitive load weakens neural speech tracking without altering response timing.Journal: Communications biologyIn common: MNE-Connectivity, MNE-Python, statsmodels, 4 other tools, EEG, 1 reference
- [10] doi:10.3389/fncom.2026.1786996 [code]
- Schumann-anchored golden ratio organization of human neural oscillations.Journal: Frontiers in computational neuroscienceIn common: MNE-Connectivity, MNE-Python, statsmodels, 5 other tools, EEG
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, 4 scripts, and 6 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:08f2a4f642ce2533…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
