Thursday, December 17, 2020

DFA a1 calculation - Kubios vs Python mini validation

Update 3/23/22 - As discussed in this post, alternate preprocessing methods other than the type used in Kubios (detrending method - smoothness priors) may lead to DFA a1 results that are different than seen with Kubios software.  HRV logger does use an alternate method.  Therefore, results may not agree well with published studies.  If possible, a secondary check using Runalyze, AIenduance or Fatmaxxer is recommended.

 

Just his past week, Marco Altini a prominent HRV advocate and researcher created a python based process to take an RR data series and output DFA a1/HR related values.  Although python is not part of my skill set (as in the old Star Trek line - "I'm a doctor not a ...."), some friends at Suunto happened to be working on something similar and we decided to take a look.  The idea was to test the "agreement" between the gold standard Kubios to that of a python derived DFA a1.  To do so we used the Polar H10 recorded running ramp from the prior post.  The RR time series was fed through a python based program with the following settings:

  • hrvanalysis.remove_outliers(low_rri=300, high_rri=2000)
  • hrvanalysis.interpolate_nan_values(interpolation_method="linear")
  • hrvanalysis.remove_ectopic_beats(method="malik")
  • hrvanalysis.interpolate_nan_values
  • Basic script from here
  • DFA a1 package here 
  • This is not the software from Marco Altini's site but it does use many of the same Python tools

In summary, we have the same Polar H10 RR series, comparing Kubios (auto correction mode) with the Python method.  I'm going to comment up front that artifact identification and correction methods are going to be different.  This could have a major impact on DFA a1 values.

Results:

Time varying output (2 min windows with recalculation every 5 sec)


  • If this looks like the graph from the last post, it's not your imagination.  This is the same data, but now the Python derived DFA a1 is added in purple triangles.
  • There is reasonable (but not perfect) tracking of each data point.

How does this look with regression analysis.  Here is a pair by pair plot of DFA a1 at all values:

R squared is .85 which is decent (but not excellent) and the slope is .82 indicating possible bias.

This was confirmed in a Bland Altman analysis:

I circled the area of concern, at DFA a1 below.75, the bias (relative difference between paired values) and standard deviation (scatter) becomes much larger.  This could be related to a few more artifacts in this region (zero to 1%) or simply the underlying method of calculation.

Aerobic threshold calculations

Does the 20% bias at DFA a1 < .75 affect the HRVT (the VT1 related heart rate variability threshold)?

  • Not really.
  • Although the values are different in the DFA a1 1.5 to .3 region, the HRVT is quite close, only about 2 bpm divergent.  There was more of a differential with lines drawn from 1.0 to .3, but still within several bpm.

Some observations:

  • Kubios is and remains a gold standard for HRV and DFA a1 calculation. 
  • The above python implementation seems (based on very limited data) to resemble that of Kubios.  
  • A time varying look at DFA a1 using python scripting has enormous potential to help guide ones training regime.  Both a retrospective look at an exercise session as well as a real time mini app on a smartwatch or phone may even be possible.  One of my wish list items is a simple green, yellow, red marker on your watch indicating what your last 2 minute DFA a1 result was (with some sort of "confidence indicator" for artifacts).
  • Issues to be worked out include artifact identification and correction (not necessarily the same thing) and more validation study.
  • Many thanks to Olli-Pekka Koistinen and the Suunto team for the python calculations and background scripting information.  
  • Thanks to Marco Altini for increasing awareness of nonlinear HRV related fractal correlation properties as a tool to help guide training intensity distribution and measurement of the aerobic threshold.  I hope he continues to work on the app and improve the agreement to Kubios.

  

Addendum 12/20/2020

  The following figures will compare the Suunto python method, Marco's method and of course the gold standard Kubios.


Bland Altman Difference analysis:

  • The Python based algorithm used by HRV logger yields similar results as the method used by the engineers at Suunto to compute DFA a1.  This is not agreeing well with Kubios HRV at low DFA a1.
  • Although further study and verification is needed, this is an exciting development for athletic intensity modulation and zone identification.
  • Looking forward to HRV logger improvements.


Frontiers in Physiology - Validation of DFA a1 as a marker of VT1 

Real time Aerobic thresholds and polarized training with HRV Logger 

Active Recovery with HRV Logger  

DFA a1 and exercise intensity FAQ  

No comments:

Post a Comment