Selected engineering work

Biomedical research

EEG Signal Processing & Classification: Sleep Spindle Detection and Motor Imagery Classification

Two reproducible EEG pipelines for sleep spindle detection and left-vs-right motor imagery classification, with interpretable signal processing and leakage-aware session evaluation.

PythonMNE-PythonNumPypandasSciPyscikit-learnMatplotlibYASAStreamlitCSPLDALinear SVM
Choose your depth
Architecture, choices & results

Detect sleep spindles and classify motor imagery while inspecting parameter sensitivity and cross-subject/session robustness.

Follow the flow from input to evaluated output. Select a stage to inspect its role.

Dataset and sampling audit — Dataset and sampling audit

Engineering decision

Fit CSP inside session-separated folds

Problem
Random trial splitting can overestimate multi-session EEG performance.
Approach
Fit CSP only on training folds in within-subject Leave-One-Session-Out across R04, R08 and R12; normalize channel labels and exclude incompatible sampling frequencies.
Trade-off / scope
Subject/session non-stationarity remains a constraint despite tuning.
direct evidenceResearch evaluation

EPCTL11 manual/YASA spindle calibration and cross-participant limits. Manual detector versus YASA detection counts on calibration participant EPCTL11. Cross-participant sensitivity and failure-mode inspection after EPCTL11 calibration.

Documented resultEPCTL11 manual/YASA spindle calibration and cross-participant limitsEPCTL11 spindle calibration (local research; completed): ANPHY-Sleep participants 11–15; Cz channel, 0.5–30 Hz broad-band and 11–16 Hz spindle-band filtering, Hilbert amplitude envelope, 100 ms smoothing, mean + 1.2 × standard deviation threshold, and 0.5–2.0 second duration constraints. EPCTL11 supplied the calibration comparison. ANPHY-Sleep calibration participant EPCTL11; count agreement, not annotated detection accuracy. Spindle cross-participant checks (local research; completed): Apply the calibrated manual detector and compare with cached YASA detections. EPCTL14 generalized well; EPCTL12 showed moderate over-sensitivity; EPCTL13 and EPCTL15 exposed failure modes. Manual detections generally had shorter mean durations. ANPHY-Sleep EPCTL12, EPCTL13, EPCTL14 and EPCTL15. Manual spindle detections: 484. EPCTL11 calibration only: 484 manual versus 468 YASA detections; difference +16, approximately +3.42% relative to YASA. More detections do not establish better accuracy. YASA spindle detections: 468. EPCTL11 calibration only: 484 manual versus 468 YASA detections; difference +16, approximately +3.42% relative to YASA. More detections do not establish better accuracy. Manual minus YASA detection count: +16. EPCTL11 calibration only: 484 manual versus 468 YASA detections; difference +16, approximately +3.42% relative to YASA. More detections do not establish better accuracy. Relative detection-count difference: ~+3.42%. EPCTL11 calibration only: 484 manual versus 468 YASA detections; difference +16, approximately +3.42% relative to YASA. More detections do not establish better accuracy. Research workflows and benchmarks, not clinical diagnostic systems or production medical devices. EPCTL11 detection-count agreement is a calibration-participant result, not universal detection improvement or validated accuracy, sensitivity or specificity. EPCTL14 generalized well; EPCTL12 showed moderate over-sensitivity; EPCTL13 and EPCTL15 exposed cross-subject failure modes. Manual detections generally had shorter average durations than YASA. No aggregate cross-participant quality metric is supplied.
direct evidenceDataset audit

109-subject audit establishes a clean 106-subject motor imagery baseline. 109 subjects audited; incompatible recordings excluded to establish a clean 106-subject baseline.

Documented result109-subject audit establishes a clean 106-subject motor imagery baselinePhysioNet sampling-frequency audit (local research; completed): Exclude S088, S092 and S100 (128 Hz rather than expected 160 Hz). Normalize channel names before montage assignment. PhysioNet EEG Motor Movement/Imagery cohort: 109 audited subjects, 3 exclusions, 106 retained for baseline. Audited subjects: 109. PhysioNet EEG Motor Movement/Imagery cohort: 109 audited subjects, 3 exclusions, 106 retained for baseline. Exclude S088, S092 and S100 (128 Hz rather than expected 160 Hz). Normalize channel names before montage assignment. Sampling-frequency exclusions: 3. PhysioNet EEG Motor Movement/Imagery cohort: 109 audited subjects, 3 exclusions, 106 retained for baseline. Exclude S088, S092 and S100 (128 Hz rather than expected 160 Hz). Normalize channel names before montage assignment. Clean baseline subjects: 106. PhysioNet EEG Motor Movement/Imagery cohort: 109 audited subjects, 3 exclusions, 106 retained for baseline. Exclude S088, S092 and S100 (128 Hz rather than expected 160 Hz). Normalize channel names before montage assignment. Research workflows and benchmarks, not clinical diagnostic systems or production medical devices. S088, S092 and S100 were excluded because their 128 Hz recordings differed from the expected 160 Hz; the clean baseline contains 106 of 109 audited subjects.
direct evidenceResearch evaluation

Baseline CSP classifiers achieve approximately 61.5% / 61.7% mean session-wise LOSO accuracy. Baseline CSP + LDA and CSP + linear SVM mean LOSO accuracy.

Documented resultBaseline CSP classifiers achieve approximately 61.5% / 61.7% mean session-wise LOSO accuracyMotor imagery baseline LOSO (local research; completed): 8–30 Hz filtering; cue-locked epochs -1.0 to 4.0 s, baseline -1.0 to 0.0 s, classification window 0.5 to 3.5 s. Fit CSP on training folds only. Subject-wise Leave-One-Session-Out across R04, R08 and R12, avoiding random trial splits. PhysioNet EEG Motor Movement/Imagery: clean 106-subject baseline, sessions R04, R08 and R12. Baseline CSP + LDA LOSO accuracy: ~61.5%. Baseline CSP + LDA; reported mean research LOSO accuracy. PhysioNet EEG Motor Movement/Imagery: clean 106-subject baseline, sessions R04, R08 and R12. Within-subject Leave-One-Session-Out (R04, R08, R12). Not a clinical or held-out-subject result. Baseline CSP + linear SVM LOSO accuracy: ~61.7%. Baseline CSP + linear SVM; reported mean research LOSO accuracy. PhysioNet EEG Motor Movement/Imagery: clean 106-subject baseline, sessions R04, R08 and R12. Within-subject Leave-One-Session-Out (R04, R08, R12). Not a clinical or held-out-subject result. Research workflows and benchmarks, not clinical diagnostic systems or production medical devices. S088, S092 and S100 were excluded because their 128 Hz recordings differed from the expected 160 Hz; the clean baseline contains 106 of 109 audited subjects. LOSO means Leave-One-Session-Out within subjects across R04, R08 and R12, not leave-one-subject-out or clinical performance. Tuning cohort size and uncertainty estimates are not separately supplied. Tuning yielded only about 1–1.2 percentage points of reported mean LOSO improvement; subject/session non-stationarity remained a larger constraint than classifier choice alone.
direct evidenceResearch evaluation

Tuned CSP classifiers achieve approximately 62.7% / 62.4% mean session-wise LOSO accuracy. Tuned CSP + LDA and CSP + linear SVM mean LOSO accuracy; no inferred tuning cohort size.

Documented resultTuned CSP classifiers achieve approximately 62.7% / 62.4% mean session-wise LOSO accuracyMotor imagery tuned LOSO (local research; completed): 8–30 Hz filtering; cue-locked epochs -1.0 to 4.0 s, baseline -1.0 to 0.0 s, classification window 0.5 to 3.5 s. Fit CSP on training folds only. Subject-wise Leave-One-Session-Out across R04, R08 and R12, avoiding random trial splits. LDA: 6 CSP components, LSQR, shrinkage = 0.3. Linear SVM: 8 CSP components. Confusion matrices, CSP spatial patterns and CSV summaries inspected in a Streamlit experiment dashboard. PhysioNet EEG Motor Movement/Imagery left-vs-right motor imagery; tuning cohort size not separately supplied. Tuned CSP + LDA LOSO accuracy: ~62.7%. 6 CSP components, LSQR and shrinkage = 0.3; reported mean research LOSO accuracy. PhysioNet EEG Motor Movement/Imagery left-vs-right motor imagery; tuning cohort size not separately supplied. Within-subject Leave-One-Session-Out (R04, R08, R12). Not a clinical or held-out-subject result. Tuned CSP + linear SVM LOSO accuracy: ~62.4%. 8 CSP components, linear SVM; reported mean research LOSO accuracy. PhysioNet EEG Motor Movement/Imagery left-vs-right motor imagery; tuning cohort size not separately supplied. Within-subject Leave-One-Session-Out (R04, R08, R12). Not a clinical or held-out-subject result. Research workflows and benchmarks, not clinical diagnostic systems or production medical devices. S088, S092 and S100 were excluded because their 128 Hz recordings differed from the expected 160 Hz; the clean baseline contains 106 of 109 audited subjects. LOSO means Leave-One-Session-Out within subjects across R04, R08 and R12, not leave-one-subject-out or clinical performance. Tuning cohort size and uncertainty estimates are not separately supplied. Tuning yielded only about 1–1.2 percentage points of reported mean LOSO improvement; subject/session non-stationarity remained a larger constraint than classifier choice alone.

EPCTL11 spindle calibration: completed. ANPHY-Sleep calibration participant EPCTL11; count agreement, not annotated detection accuracy. Spindle cross-participant checks: completed. ANPHY-Sleep EPCTL12, EPCTL13, EPCTL14 and EPCTL15. PhysioNet sampling-frequency audit: completed. PhysioNet EEG Motor Movement/Imagery cohort: 109 audited subjects, 3 exclusions, 106 retained for baseline. Motor imagery baseline LOSO: completed. PhysioNet EEG Motor Movement/Imagery: clean 106-subject baseline, sessions R04, R08 and R12. Motor imagery tuned LOSO: completed. PhysioNet EEG Motor Movement/Imagery left-vs-right motor imagery; tuning cohort size not separately supplied.

A documented safety and scope boundary.

Research workflows and benchmarks, not clinical diagnostic systems or production medical devices. EPCTL11 detection-count agreement is a calibration-participant result, not universal detection improvement or validated accuracy, sensitivity or specificity. EPCTL14 generalized well; EPCTL12 showed moderate over-sensitivity; EPCTL13 and EPCTL15 exposed cross-subject failure modes. Manual detections generally had shorter average durations than YASA. No aggregate cross-participant quality metric is supplied. S088, S092 and S100 were excluded because their 128 Hz recordings differed from the expected 160 Hz; the clean baseline contains 106 of 109 audited subjects. LOSO means Leave-One-Session-Out within subjects across R04, R08 and R12, not leave-one-subject-out or clinical performance. Tuning cohort size and uncertainty estimates are not separately supplied. Tuning yielded only about 1–1.2 percentage points of reported mean LOSO improvement; subject/session non-stationarity remained a larger constraint than classifier choice alone. ANPHY-Sleep / PhysioNet methods, metrics and artifact belong to this project, separately from Swin/FRP seizure classification on TUSZ.

Documented services

Deployment is not documented.

Context limited to Sleep Spindles & Motor Imagery

Challenge this project.

Ask about the decisions, evaluation or boundaries behind the work.

Deterministic answers from documented portfolio evidence · project-scoped

A claim is only the beginning

Where did I use it?
What did I build?
How did I measure it?

Follow the projects, decisions and evaluation behind each answer. Every important claim has somewhere to go.

Direct · measured implementation Supporting · documented use Related · adjacent experience
An inspectable claimPG / 001
CAPABILITYRetrieval-augmented generation
IMPLEMENTATION

BM25+semantic retrieval

Trace the evaluation behind the number