WHOOP Overtraining Detection
A convolutional autoencoder for detecting overtraining patterns in WHOOP fitness data.
Quick Start
Installation
pip install torch pandas numpy scikit-learn joblib huggingface_hub
Usage
Option 1: Using inference.py (Recommended)
Download inference.py from this repo, then:
from inference import OvertainingPredictor
# Load model
predictor = OvertainingPredictor.from_pretrained("iserrano0511/whoop-overtraining-detector")
# Predict from CSV
results = predictor.predict_from_csv("your_whoop_data.csv")
# Print summary
print(predictor.summary(results))
# Check anomalies
for r in results:
if r.is_anomaly:
print(f"{r.date}: {r.risk_level} risk (score: {r.anomaly_score:.2f})")
Option 2: Manual Loading
import torch
import joblib
from huggingface_hub import hf_hub_download
# Download files
model_path = hf_hub_download("iserrano0511/whoop-overtraining-detector", "model.pt")
scaler_path = hf_hub_download("iserrano0511/whoop-overtraining-detector", "scaler.pkl")
config_path = hf_hub_download("iserrano0511/whoop-overtraining-detector", "config.json")
# Load
checkpoint = torch.load(model_path, map_location='cpu', weights_only=False)
scaler = joblib.load(scaler_path)
Model Details
| Property | Value |
|---|---|
| Architecture | CONV Autoencoder |
| Input Shape | (batch, 7, 33) |
| Latent Size | 32 |
| Anomaly Threshold | 0.2113 |
How It Works
- Input: 7 consecutive days of physiological data (33 features)
- Processing: Autoencoder reconstructs the input
- Detection: High reconstruction error = anomaly
- Output: Risk level (normal/elevated/high/critical)
Risk Levels
| Level | Score | Meaning |
|---|---|---|
| Normal | < 1.5 std | Typical patterns |
| Elevated | 1.5-2.5 std | Minor deviation |
| High | 2.5-3.5 std | Significant anomaly |
| Critical | > 3.5 std | Major deviation |
Required Data Columns
Your CSV needs these columns:
user_id,datehrv,resting_heart_rate,hrv_baseline,rhr_baselinerespiratory_rate,skin_temp_deviationsleep_hours,sleep_efficiency,deep_sleep_hours,rem_sleep_hourswake_ups,time_to_fall_asleep_minday_strain,recovery_score
Files
model.pt- PyTorch model weightsscaler.pkl- Data scaler (joblib)config.json- Model configurationinference.py- Self-contained inference module
Limitations
- Trained on synthetic WHOOP-style data
- Screening tool only, not diagnostic
- Requires 7+ days of consecutive data
Citation
@misc{whoop-overtraining,
author = {iserrano0511},
title = {WHOOP Overtraining Detection},
year = {2024},
publisher = {Hugging Face},
url = {https://huggingface.co/iserrano0511/whoop-overtraining-detector}
}
- Downloads last month
- 15