This study analyzed the effects of training and match loads on heart rate variability (HRV) during a single season in semi-professional basketball players, and identified which variables most strongly influence HRV changes using the explainable machine learning (XAI) technique SHAP (SHapley Additive exPlanation). Key findings show that HRV on match days was significantly lower than on training or non-training days, and that rating of perceived exertion (RPE), days since last match, and match playing time were the most influential factors driving HRV changes. Individual differences in which factors affect each player's HRV were also confirmed, underscoring the importance of personalized athlete management strategies.


1. Research Background and Objectives

Properly managing training load and recovery during multi-month competitive seasons in team sports is critical for reducing injury risk and optimizing performance. Training load can be divided into external load (the work performed during training or competition) and internal load (the athlete's physiological response). Basketball in particular involves many high-intensity interval movements, and the physical and tactical demands vary by position, making individual athlete monitoring essential.

Heart rate variability (HRV) serves as a useful indicator for understanding the state of the autonomic nervous system and its potential relationship with fatigue. HRV responds sensitively to the previous day's stimulus, tending to decrease following acute physiological stressors such as high-intensity training or competition. Among HRV metrics, LnRMSSD is widely used for fatigue monitoring, but responses to training load tend to vary between athletes. Most research has focused only on specific short periods of the season, and there is a lack of clear consensus on the relationship between HRV and other load-related variables.

The main objectives of this study were:

  1. To evaluate the effect of previous-day training and match stimuli on HRV.
  2. To build a model explaining the load variables that influence basketball players' HRV throughout the season.
  3. To identify individual player-specific factors affecting HRV changes.
  4. To demonstrate the utility of an explainable machine learning framework in providing practical insights for athlete monitoring.

The authors hypothesized that previous-day training or match load would affect next-day HRV response, that specific load variables would better explain these changes, and that individual players would differ in the factors influencing their responses.


2. Methods

This study conducted a longitudinal observational study over approximately seven months (October--April) during a single season (2021--2022) with five semi-professional basketball players from a team competing in the Spanish EBA League (4th division). The players comprised two point guards, two wings, and one center.

2.1. Participants and Data Collection

Participating players recorded training load variables, rating of perceived exertion (RPE), training and match duration, and HRV daily. Each player provided an average of 212.6 +/- 23.9 heart rate and HRV recordings and 257 RPE and duration recordings. A typical weekly schedule consisted of four training sessions and one match.

  • Day classification: All days during the season were classified into three types: match day (MD), training day (TD), and non-training day (NTD).
    • Match day (MD): A day when the player participated in an official match for at least 1 minute.
    • Training day (TD): A day when the player fully participated in a team training session.
    • Non-training day (NTD): A day when the player did not participate in any match or training session.

Microcycle types Figure 1: Distribution of typical microcycle types and heart rate measurement days during the season

2.2. Training Load Measurement

The primary load indicators were training session duration or match playing time, and the subjective effort rating RPE (Rating of Perceived Exertion). From these two indicators, session-RPE (sRPE) was calculated (sRPE = training/match duration x RPE). RPE data were collected using the TrainingFeel app on players' mobile devices, answering "How hard did the session feel?" on a Borg scale of 1--10, 15--30 minutes after session completion. Match playing times were obtained from official Spanish Basketball Federation records.

Moving averages, weighted averages, and exponentially weighted moving averages (EWMA) were calculated for each variable. EWMA assigns greater weight to recent loads and is used for load monitoring.

2.3. Heart Rate Variability (HRV) Measurement

Heart rate (HR) data were collected during training sessions and matches to monitor training load responses. From this, HR, RMSSD, and LnRMSSD were derived. HRV monitoring, particularly LnRMSSD, has been widely used as a method for assessing responses to training load.

HRV data were measured by participants using the HRV4Training app, taking 1-minute readings in a supine position each morning upon waking. Ultra-short recordings (1 minute or less) have been shown to be sensitive to the previous day's stimulus and demonstrate good agreement with standard 5-minute recordings. Measurements used photoplethysmography (PPG), a non-invasive and validated method that detects blood flow changes by placing a finger against the smartphone camera and flash.

2.4. Statistical Analysis

  • Linear mixed model: A linear mixed model was used to analyze the effect of day type (match, training, non-training) on HRV (LnRMSSD). Random intercepts were included to account for individual LnRMSSD differences between players.
  • Explainable machine learning (XAI) model: An Extreme Gradient Boosting (XGBoost) model was used to establish dependency relationships between LnRMSSD and basketball players' load indicators. XGBoost is a model with excellent predictive power that sequentially adjusts hundreds of decision trees.
  • SHAP analysis: SHAP (SHapley Additive exPlanation) was applied to interpret XGBoost model results. SHAP values quantify how much each load variable contributes (positively or negatively) to LnRMSSD prediction, enabling understanding of each variable's overall importance and contribution in the model. Notably, this allows interpretation at both global and individual player (local) levels, making it highly useful for personalized decision-making for individual athletes.

XGBoost modeling pipeline Figure 2: Schematic of the XGBoost modeling pipeline


3. Results

3.1. LnRMSSD Changes by Day Type

Analysis through the linear mixed model revealed significant differences in LnRMSSD values by day type.

  • Non-training day (NTD): 4.711 +/- 0.146 ln ms
  • Training day (TD): 4.653 +/- 0.146 ln ms
  • Match day (MD): 4.408 +/- 0.149 ln ms

LnRMSSD values on match days (MD) were statistically significantly lower compared to non-training days (NTD) and training days (TD) (mean difference = 0.304, p < 0.001; mean difference = 0.245, p < 0.001, respectively). In contrast, there was no significant difference between non-training and training days (mean difference = 0.058, p = 0.578). This suggests that matches are the stimulus with the greatest impact on athletes' autonomic nervous system recovery.

Daily LnRMSSD distribution by day type Figure 3: Daily LnRMSSD distribution by day type (non-training day, training day, match day)

3.2. XGBoost Model Performance and Key Variables

The XGBoost model's predictive performance was evaluated through 5-fold cross-validation, with a cross-validated RMSE (root mean square error) of 0.2683 +/- 0.0126, consistent with the training RMSE (0.2567). This indicates that the model is robust in characterizing the relationship between training load variables and LnRMSSD.

SHAP analysis revealed that the most influential variables on LnRMSSD changes were:

  • RPE (Rating of Perceived Exertion): The subjective training or match intensity perceived by players.
  • DaysLastMatch: How many days have passed since the last match.
  • Volume_LastMatch (last match playing time): Minutes played in the previous match.
  • sRPE_avg4 (4-day sRPE average): The session-RPE average over the past 4 days.
  • RPE_LastMatch (last match RPE): The RPE reported for the previous match.

Additionally, pre-stimulus variables such as pre-training/match RMSSD and HR (heart rate) values were also found to influence next-day LnRMSSD changes.

Most important variables for LnRMSSD characterization Figure 4: Most important variables for LnRMSSD characterization. The Y-axis shows importance rank, and the X-axis (SHAP values) indicates the direction and magnitude of each variable's effect on model output. Red indicates higher variable values; blue indicates lower values.

3.3. Individual Player Analysis

SHAP individual analysis clearly demonstrated inter-individual differences in the ranking, weighting, and influence of variables associated with HRV changes for each player. This highlights the heterogeneity of physiological responses in team sports.

  • For example, Players 1 and 4 were primarily influenced by RPE and match-related variables, indicating high sensitivity to perceived intensity and match stress.
  • In contrast, Player 5 showed RMSSD_pre as one of the most influential variables, suggesting that the baseline autonomic state before training or matches plays a decisive role in next-day LnRMSSD regulation.
  • Some players were more sensitive to acute load (e.g., RPE), while others were more influenced by cumulative load (e.g., sRPE_avg4).

These contrasting profiles show that even though certain metrics (e.g., RPE, match proximity) are important at the team level, their relative importance varies considerably between individuals.

Most important variables for LnRMSSD characterization per player Figure 5: Most important variables for LnRMSSD characterization per player. The direction of SHAP values (positive or negative) indicates the direction of each variable's effect relative to the model prediction for LnRMSSD.


4. Discussion

The main findings of this study are as follows. First, LnRMSSD is affected by previous-day training load, and matches are the stimulus inducing the greatest change. Second, intensity metrics, particularly RPE, emerged as one of the most important variables explaining next-day LnRMSSD changes. Third, individual differences exist in the variables most strongly influencing LnRMSSD changes for each player.

4.1. Impact of Match Load

Previous studies have also reported that HRV is affected by training load in team sport athletes, but most focused on short time periods. This study monitored players throughout an entire competitive season, showing that match-day LnRMSSD was significantly lower compared to training and non-training days. This implies that matches impose the greatest load on athletes' autonomic nervous systems and may require more recovery time. Considering that at least 48 hours are needed for complete parasympathetic reactivation after high-intensity sessions, the importance of post-match recovery periods is further emphasized.

4.2. Importance of RPE and Match-Related Variables

SHAP analysis confirmed that RPE (Rating of Perceived Exertion) and days since last match (DaysLastMatch) were the most influential variables on LnRMSSD changes. This is consistent with previous research findings and demonstrates that subjectively perceived training intensity has a significant impact on HRV.

"This suggests that RPE can be used as a simple, low-cost monitoring tool to track internal load and help predict short-term changes in athletes' physiological state."

Additionally, last match playing time (Volume_LastMatch) and last match RPE (RPE_LastMatch) were also found to significantly influence LnRMSSD, suggesting that match intensity and recovery period should be key considerations in basketball microcycle planning. Psychological variables may also affect HRV, so match demands and outcomes may influence the magnitude of changes as well.

The 4-day sRPE average (sRPE_avg4) showed an inverse relationship with next-day LnRMSSD, which may be because it incorporates both volume and perceived intensity (RPE), with volume potentially having a greater influence. In contrast, 7-day average volume had a positive effect on LnRMSSD, showing that appropriate training exposure may help maintain favorable LnRMSSD values.

Pre-training HR (HR_pre) and pre-training RMSSD (RMSSD_pre) also played important roles. Higher resting HR or lower RMSSD values appear to contribute to greater next-day LnRMSSD decreases. This means that training load should be planned considering not only training intensity but also the athlete's physiological state before each session.

4.3. The Need for Individualized Monitoring

This study clearly demonstrated that the training load indicators influencing LnRMSSD responses differ between individual players. Players like Players 1 and 4, primarily influenced by RPE and match-related variables, showed high sensitivity to perceived intensity and match stress, while Player 5 depended more strongly on physiological baseline states like RMSSD_pre. These results emphasize the importance of personalized monitoring processes based on individual athlete characteristics.

"The added value of the explainable model is to transition from a one-size-fits-all monitoring framework to a player-specific monitoring framework, enabling coaches to better adjust training and recovery strategies according to each player's load-response profile."

4.4. Study Limitations

This study has several limitations. First, the small sample size limits the ability to draw broad conclusions or generalize results, though substantial data were collected from each player to train the models. Second, only a single season was analyzed, necessitating larger-scale longitudinal studies. Third, training load was assessed using subjective RPE, which can be influenced by factors such as mood and motivation. Fourth, psychological stress, known to affect HRV, was not measured. Finally, the absence of external load measurements (e.g., GPS, accelerometers) made direct comparison between internal and external load factors difficult.


Conclusion

This study is the first proof-of-concept study applying an explainable machine learning (SHAP) approach to explain the effects of training and match load on ultra-short-term heart rate variability (LnRMSSD) throughout an entire season in semi-professional basketball players. The key finding is that LnRMSSD is significantly affected by previous-day training load, with matches being the stimulus inducing the greatest change.

In particular, RPE (Rating of Perceived Exertion) and days since last match were identified as the main factors influencing LnRMSSD changes, and last match playing time and pre-training/match physiological state (RMSSD, HR) were also found to have significant effects. Most importantly, the fact that the variables and degree of influence on HRV regulation differ for each individual player emphasizes the importance of personalized training load management and fatigue monitoring strategies.

Interpretable machine learning techniques such as SHAP clearly reveal how training load affects fatigue in team sports, providing a potentially useful framework for predicting training load adjustments and optimizing athletes' performance and recovery. Further research is needed to verify the generalizability of these findings across more teams and diverse contexts.

Related writing