← kineticaai.com
Kinetica AI · ANS Predictor · Research

ANS Predictor
Wearable symptom forecasting.

Multi-symptom clinical prediction from nocturnal heart rate variability. N=1 longitudinal study using a consumer wristwatch, a daily symptom diary, and open-source machine learning. All data and code public.

Loading data...
Methodology

N-of-1 longitudinal design

A single post-Lyme patient wearing a Polar Grit X2 every night. Raw RR intervals are processed into 13 HRV features across 3 time-domain and frequency-domain families. Each morning, symptom severity is scored across 5 dimensions using a standardized diary (DSQ-PEM adapted).

Feature selection: Forward selection per target — each symptom model independently selects its own best features from the 13 candidates across 3 lag windows (t0, t-1, t-2). No shared feature set imposed.

Validation: Leave-one-out cross-validation (LOO-CV) for primary AUC. 1,000× bootstrap for confidence intervals. No train/test split — every data point serves as both training and validation exactly once.

Models: Logistic regression, random forest, and gradient boosting trained on each target independently. Best model selected by LOO-CV AUC.

Results

Multi-symptom prediction performance

Five independent models, each predicting a different symptom dimension from nocturnal HRV data.

Model comparison

Three algorithms, one winner

All models trained on the severity target with the same feature set. LOO-CV evaluation.

Lag analysis

Temporal structure of autonomic signals

Spearman correlations between nocturnal HRV features and next-day symptom severity at different lag windows. Lag 0 = same night, Lag 2 = two nights prior.

Data pipeline

Automated nightly collection

Every night at 06:00 UTC, a GitHub Actions workflow pulls fresh data from the Polar AccessLink API. Raw RR intervals are processed into 13 HRV features using NeuroKit2. The resulting JSON is committed to the repository and deployed automatically to this page.

When a new diary entry is pushed, a separate workflow triggers model retraining with the updated dataset. Leave-one-out cross-validation runs on the full history, and the predictor coefficients in polar_live.json are updated.

Stack: Python · scikit-learn · neurokit2 · Polar Grit X2 · GitHub Actions · CSV