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

  1. Input: 7 consecutive days of physiological data (33 features)
  2. Processing: Autoencoder reconstructs the input
  3. Detection: High reconstruction error = anomaly
  4. 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, date
  • hrv, resting_heart_rate, hrv_baseline, rhr_baseline
  • respiratory_rate, skin_temp_deviation
  • sleep_hours, sleep_efficiency, deep_sleep_hours, rem_sleep_hours
  • wake_ups, time_to_fall_asleep_min
  • day_strain, recovery_score

Files

  • model.pt - PyTorch model weights
  • scaler.pkl - Data scaler (joblib)
  • config.json - Model configuration
  • inference.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
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support