Views
No views yet
pip install torch pandas numpy scikit-learn joblib huggingface_hubinference.py from this repo, then:1from inference import OvertainingPredictor
2
3# Load model
4predictor = OvertainingPredictor.from_pretrained("iserrano0511/whoop-overtraining-detector")
5
6# Predict from CSV
7results = predictor.predict_from_csv("your_whoop_data.csv")
8
9# Print summary
10print(predictor.summary(results))
11
12# Check anomalies
13for r in results:
14 if r.is_anomaly:
15 print(f"{r.date}: {r.risk_level} risk (score: {r.anomaly_score:.2f})")1import torch
2import joblib
3from huggingface_hub import hf_hub_download
4
5# Download files
6model_path = hf_hub_download("iserrano0511/whoop-overtraining-detector", "model.pt")
7scaler_path = hf_hub_download("iserrano0511/whoop-overtraining-detector", "scaler.pkl")
8config_path = hf_hub_download("iserrano0511/whoop-overtraining-detector", "config.json")
9
10# Load
11checkpoint = torch.load(model_path, map_location='cpu', weights_only=False)
12scaler = joblib.load(scaler_path)| Property | Value |
|---|---|
| Architecture | CONV Autoencoder |
| Input Shape | (batch, 7, 33) |
| Latent Size | 32 |
| Anomaly Threshold | 0.2113 |
| 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 |
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_scoremodel.pt - PyTorch model weightsscaler.pkl - Data scaler (joblib)config.json - Model configurationinference.py - Self-contained inference module1@misc{whoop-overtraining,
2 author = {iserrano0511},
3 title = {WHOOP Overtraining Detection},
4 year = {2024},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/iserrano0511/whoop-overtraining-detector}
7}