nightbrain
How it works

It teaches you the machine learning on your own dataset.

Nightbrain is a machine learning crash course built around the data users care about most: their own. Instead of learning regression on generic, impersonal datasets, users connect their wearable data and work through core ML concepts using their own sleep patterns. Each module pairs a fundamental technique with a hands-on exercise, like predicting tomorrow's sleep score or identifying which habits actually move recovery metrics. The result is a learning experience where every concept has personal stakes, every dataset is familiar, and every insight is immediately actionable.

A Nightbrain morning

Rate. Refit. Unlock.

1 — Rate first

Before you look at anything.

One tap, 1–5, straight from the notification. Rating before you see any data keeps your answer honest — the score can't anchor how you think you slept.

2 — The model refits

Trained on you, only you.

Every night your model refits from scratch on your full history: sleep duration and timing, HRV, resting heart rate, temperature. No population averages standing in for you.

3 — Insights unlock

When they're earned.

Nothing surfaces until it clears a real confidence bar. Early on, the honest output is "too uncertain to say" — and Nightbrain says it.

The model

A small model, held to a high bar.

The loop is daily: overnight your wearable syncs, in the morning you rate, then the model refits and its prediction error updates. What follows is what "earned" actually means.

Fit

every morning

A lasso regression, refit from scratch on your history alone — duration and timing, bedtime consistency, HRV, resting heart rate, temperature, respiration, REM and deep sleep, 7-day sleep debt, yesterday's rating. Why lasso: with a few dozen mornings, a model must be forced to admit "not enough evidence." Its penalty shrinks weak effects to exactly zero — the silence is in the math, not bolted on afterward.

Check

out of sample

The model's one tuning knob is set by five-fold cross-validation, and the "typical miss" shown in the app is measured on mornings the fit never saw — honest error, not the flattering in-sample kind.

Survive

the unlock bar

Before an insight unlocks, its effect has to reappear in at least 80% of 200 bootstrap refits — two hundred alternate versions of your history, resampled night by night — and you need thirty rated mornings, minimum. One lucky week can't mint a claim.

200 resamples · 80% stability · 30 mornings

Interval

always shown

Every prediction carries an 80% interval and every effect its own range. An effect whose range still crosses zero stays unclaimed — "too uncertain to say," on screen, as a first-class answer.

Next

built to be replaced

Lasso is the opening act. A Bayesian sparse model, then a GAM — curves with uncertainty bands instead of straight lines — drop in behind the same interface once they prove themselves on real nights. The bar stays; the machinery under it improves.

fit · predict → (point, interval) · coefficients · curves

Why it's different

Four things no sleep score does.

Your word is the ground truth.

Nightbrain predicts how you'll say you feel — it never grades your night against someone else's idea of good sleep.

You rate before you peek.

Last night's data stays sealed until you've rated — structural, not a suggestion — so the numbers can never anchor how you think you slept.

Trained on you, nobody else.

The model refits every night on your history alone. No population averages wearing your name.

Silent until it's sure.

Insights unlock only past a real statistical bar. Early on, the honest output is "too uncertain to say" — and it says it.

Why not another sleep score

A score that contradicts your own body teaches you to distrust yourself.

Sleep researchers have a name for waking up fine and feeling worse after reading your app: orthosomnia. The score isn't lying, exactly — it's just answering a different question than the one you care about. Nightbrain never grades your night. It predicts how you will say you feel, shows its prediction error honestly, and lets the data argue with itself instead of with you.

The beta

Your first insight is a few weeks of mornings away.

The model needs real mornings before it can claim anything — most patterns clear the confidence bar somewhere past week three. The sooner the first rating, the sooner the first earned insight.

Join the beta iPhone · Oura