PIRX Docs
Performance Trends

Model & Risk

Model & Risk screenshot

Source: (inline in performance/page.tsx)


What You See

A card with four items: Projection Source (which prediction model is being used), Model Confidence (high, moderate, or low), Injury Risk Readiness (a score out of 100), and Fallback Reason (explains if PIRX had to use a simpler model).

How the Numbers Work

PIRX has several prediction models: LSTM (a neural network), KNN (a nearest-neighbor approach), and Deterministic (a formula based model). It picks the best one available. Confidence is high when 80% or above, moderate at 60-79%, and low below 60%. If a model is not available, PIRX falls back to a simpler one and tells you why.

Step by Step

Models & algorithms used: Gradient Boosting, Huber loss, LSTM, Optuna, Random Forest

  1. The model orchestrator checks the database for the best available trained model. Three options:
  2. Gradient Boosting Regressor -- GBR with Huber loss, 200 trees, max depth 4, learning rate 0.05, trained on 17 features; default confidence 0.65.
  3. LSTM neural network -- PyTorch model with hidden size 17, sequence length 11, 50 percent dropout, trained with Huber loss and Adam optimizer, hyperparameters tuned by Optuna.
  4. Deterministic fallback -- the weighted driver formula with no ML, confidence set to 0.50. Injury risk uses a Random Forest Regressor (200 trees, max depth 8, minimum 4 samples per leaf) trained on ACWR, load spike, weekly distance change, pace variance, and physiological signals. Labels are built from real injury patterns: a training gap longer than 14 days after an activity with ACWR above 1.4 gets a label of gap_days/30 (capped at 1.0); pace worsening more than 10 percent sets the label to at least 0.7. If fewer than 30 training signals exist, a synthetic fallback Random Forest is used, trained on 1,600 hand-built samples from a risk formula. Output is calibrated piecewise. Bands: below 0.35 = Low (green), 0.35-0.60 = Moderate (yellow), 0.60+ = High (red).

On this page