The math,
not the magic.
Ten calculation engines, all classical statistics, all running on your phone. Here's how every one of them actually works — formulas included, on purpose.
Ten engines. Pearson correlations, linear regression, exponential time decay, z-scores — classical statistics, applied to chronic-illness data, computed on your device.
No LLMs reading your data. No predictive forecasts we can't explain. No vendor model where the score is a black box.
Why we built on classical statistics instead of plugging into a generic ML library — because privacy meant the math had to live on your phone; because transparency meant you should be able to read the formula; and because chronic-illness data behaves nothing like the fitness-app data those libraries were trained on.
Ten engines, end to end. Each one observes. None of them prescribes.
Each engine takes a stream of your logs, runs a specific statistical procedure on it, and surfaces what it found. You decide what to do with the answer.
Migraine Prediction
Looks at the weather, your cycle phase, your sleep, and how often migraines have hit you in the past — at this hour, on this day of the week, after this kind of barometric drop. Combines those signals into a daily risk number, capped between zero and one.
- Attack history
- Environmental snapshots
- Cycle phase
- Sleep hours
- Daily risk gauge (0–1)
- Top contributing factors
- 7-day forecast overlay
Correlation Learning Engine
Every time you confirm a trigger — “yes, dairy did cause that flare” — its weight ticks up by 0.1, capped at 1.0. Dismissals subtract 0.15. And every confirmation fades exponentially over 90 days, because a trigger you confirmed last spring isn't as relevant today as the one you confirmed Tuesday.
- Confirmed (trigger → symptom) links
- Dismissals
- Confirmation dates
- Ranked trigger list
- Suggested correlations to confirm
- Personalized decay window
Drag to watch a confirmation fade over time.
On-Device Pattern Engine
Computes Pearson correlations across every pair of things you've logged — sleep vs. mood, hydration vs. headache severity, weather vs. flare frequency. The strongest pairs bubble up. Everything runs on the phone; nothing is sent anywhere.
- Daily sleep, mood, hydration
- Vitals
- Weather snapshots
- Correlation rankings
- Threshold insights
- Interaction pairs
Symptom Insights Engine
Compares your symptom severity in periods when you were taking a medication versus when you weren't, runs a linear regression to detect drift over time, and uses chi-squared to check whether certain cycle phases see disproportionate symptom counts.
- Symptom logs (severity 0–10)
- Dose logs
- Sleep, vitals, weather, cycle
- Typed insights with confidence
- Direction of effect
- Effect sizes
ECG & SDNN
When you record an ECG on your Apple Watch, Leo extracts the R-peaks, measures the time between heartbeats, and computes the standard deviation of those intervals. That's SDNN — the standard clinical measure of heart-rate variability.
- ECG voltage waveform
- Sampling frequency
- Artifact filter (300–2000ms)
- SDNN (milliseconds)
- Average HR
- Rhythm classification
Activity → Symptom Correlation
For each kind of exertion you log, Leo counts how often a symptom flared within the next 24 hours. Then it divides by how many times that exertion happened total. The result is a “follow rate” — the fraction of times that activity is followed by a symptom.
- Activity logs (type, intensity, duration)
- Symptom logs
- Follow rates per activity
- Avg delay until symptom
- Linked trigger summaries
9 symptom episodes followed within 24 hours
Multivariate Pattern Engine
Aggregates everything to a daily vector — sleep hours, mood, vitals, symptom counts — and flags days that sit more than two standard deviations from your rolling baseline. It also runs lagged cross-correlations to catch effects that show up days later, not the same day.
- Daily feature vector
- 30-day rolling baseline
- Lag windows 1–7d
- Anomaly days
- Multi-factor patterns
- Time-lagged correlations
Holistic Health Score
A simple, transparent 0–100 score that starts at a base of 75 and adjusts. Severity drags it down. Medication adherence, sleep, journaling, and workouts each add a fixed bonus. No mystery weighting, no learned parameters — every input's contribution is visible.
- Symptom severity
- Adherence flags (4 categories)
- Daily score 0–100
- Per-category contribution breakdown
Vital Trend Analyzer
For each vital you track — heart rate, blood pressure, glucose, SpO₂ — fits an ordinary least-squares line across a rolling 7–14 day window. Reports the slope, the percent change against the prior period, and an R² goodness-of-fit so weak trends don't masquerade as strong ones.
- 7–14 day vital window
- Sample timestamps
- Trend direction
- % change vs prior
- R² confidence
PRN Effectiveness
For every as-needed medication you take, Leo tracks severity before and after, computes the percent reduction, and groups results by the symptom you took it for. Helps you see which PRN actually does something for migraine vs. nausea vs. anxiety — instead of all of them blurring together.
- PRN dose logs
- Pre / post severity (0–10)
- Symptom type tagged
- Avg effectiveness %
- Per-symptom efficacy
- Side-effect frequency
Every calculation on this page runs on your phone. No PHI is uploaded for analysis. The math is the product; we don't need your data to be ours.