Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Explainable machine learning pipeline for early ALS detection using physiologically interpretable acoustic features from smartphone recordings — Reproduction scripts

By: Iker Pacheco Herrero

Python scripts to reproduce the acoustic feature extraction and the training/validation of the classifier (LASSO + XGBoost) described in the article. The pipeline requires the SAND Challenge's audios (.WAV) to generate the tabular data.

Structure

.
├── features.py              # Step 1: feature extraction from the audios
├── train_xgblasso.py        # Step 2: selection (LASSO) + classification (XGBoost) with CV-10
├── features_training.csv    # Output of Step 1 (feature matrix, 272 × 148)
├── requirements.txt         # Exact dependency versions
│
└── training/ (not included, for intellectual property reasons)
    ├── sand_task_1.xlsx     # Metadata: ID, Age, Sex, Class
    ├── phonationA/ … U/     # Sustained vowels (/a/,/e/,/i/,/o/,/u/)
    └── rhythmPA/ TA/ KA/    # Diadochokinesis tasks (/pa/,/ta/,/ka/)

Each task folder contains one .wav per subject, named <ID>_<task>.wav (e.g. ID000_phonationA.wav). There are 272 subjects. These audios should be requested from the SAND Challenge team; this repo includes the tabular data (CSV) extracted from the raw audios (features_training.csv) so you can run the model without the audios.

Installation

Requires Python 3.12.

pip install -r requirements.txt

Usage

Step 1 — Feature extraction (processes the 8 audios of each subject in parallel from the training file and writes features_training.csv):

python features.py

Step 2 — Training and validation (reads features_training.csv, performs feature selection with LASSO and classification with XGBoost under stratified 10-fold cross-validation, and prints the metrics):

python train_xgblasso.py

The feature selection and the metrics (AUC, sensitivity, specificity, F1, accuracy and confusion matrix) are printed on the console.

Methodology

  • Label: Class == 5 → healthy subject; Class ∈ {1,2,3,4} → ALS.
  • Audio preprocessing: resampling to 8 kHz, silence trimming with Praat and extraction of phonation features (F0, jitter, shimmer, HNR, formants), rhythm/DDK and spectral features and global vowel-space metrics (tVSA, FCR).
  • Model: SimpleImputer(median)StandardScalerSelectFromModel(LogisticRegression L1, C=0.05)XGBoost. Feature selection is performed inside each fold in order to avoid data leakage. Fixed seed (random_state=42) for reproducibility.

Results (CV-10, out-of-fold, threshold 0.5)

Metric Value
AUC 0.831
Sensitivity 0.794
Specificity 0.748
F1 0.811
Accuracy 0.776

Confusion matrix: [[80, 27], [34, 131]] (rows = actual Healthy/ALS).

About

Complete explainable ML pipeline (Feature Extraction & Engineering + LASSO + XGBoost + SHAP) for ALS detection from smartphone voice recordings. AUC=0.831 on 272 subjects (VOC-ALS / SAND Challenge dataset).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages