DFA-⍺1 Aerobic Threshold estimation

1,120 views
Skip to first unread message

marco...@gmail.com

unread,
May 6, 2021, 5:48:20 PM5/6/21
to golden-cheetah-users
First of tks for the IN-EX chart.
I bet you have seen this https://zenturtle.net/2021/03/23/aerobic-threshold-estimation-using-hrv-based-method-dfa-%E2%8D%BA1/ from a guy called Marco Soldano that brings a protocol and  Python script to plot the results.
I wonder if someone has already implemented this in GC.

Tks,

aet_3_23_21.jpg

Manu

unread,
May 7, 2021, 2:43:44 AM5/7/21
to golden-cheetah-users
Hi,

there is a chart to download refered to this.

HRV Threshold estimation V1 (Py)

Hope it helps.

marco...@gmail.com

unread,
May 7, 2021, 10:30:55 AM5/7/21
to golden-cheetah-users
Hi,

Thank you but I couldn't find it.
Searching for "HRV" returned 8 chart but none of them with that name.

Regards,

PS. I'm doing something wrong on the search? 

Captura de tela 2021-05-07 112746.jpg

pepe

unread,
May 7, 2021, 12:05:54 PM5/7/21
to golden-cheetah-users
Search "HRV Threshold estimation V1 (Py) " in activities, not trends.

Best regards.

marco...@gmail.com

unread,
May 7, 2021, 1:23:37 PM5/7/21
to golden-cheetah-users
ops, my bad. Just downloaded it. Thank you very much.

But despite to be running v3.6 by "Enabling Python" I'm getting an error at start up and the box gets automatically "unchecked" 

Python not installed.jpg

Captura de tela 2021-05-07 141856.jpg

Appreciate your help.

Regards.

Aitor Altuna

unread,
May 7, 2021, 1:36:35 PM5/7/21
to golden-cheetah-users
Have you selected the python directory? 


Screenshot (14)_LI.jpg
2021(e)ko maiatzakren 7(a), ostirala (18:23:37 (UTC+1)); marco...@gmail.com erabiltzaileak hau idatzi zuen:

marco...@gmail.com

unread,
May 7, 2021, 3:53:45 PM5/7/21
to golden-cheetah-users
you nailed the problem. Because it was a brand new install in a brand new directory (as requested) I didn't worry in checking that out... 
Once Python and R are already integrated one suggestion would be to set that right in the installation process.

Nonetheless here is what is happening and some doubts:
1) Don't activities recorded by Golden Cheetah in Train mode have HRV RR intervals? here is the message I've got " NO HRV RR intervals found unable to create chart"

2) Luckily I also recorded that same activity on my Garmin with HRV recording enabled.
I have imported that activity and can see RR at raw view .
This time no error message but no chart either.

Captura de tela 2021-05-07 165139.jpg
 

Thank you,

A Evans

unread,
May 7, 2021, 5:03:12 PM5/7/21
to golden-cheetah-users
Same here.

Is scikit-learn installed in the default configuration?

I can't seem to install it, pip seems not installed either.

Maybe need a custom python install?

A

Ale Martinez

unread,
May 7, 2021, 5:31:10 PM5/7/21
to golden-cheetah-users
El viernes, 7 de mayo de 2021 a la(s) 18:03:12 UTC-3, amlyn...@gmail.com escribió:
Same here.

Is scikit-learn installed in the default configuration?

No
 
I can't seem to install it, pip seems not installed either.

Maybe need a custom python install?

Yes 

marco...@gmail.com

unread,
May 7, 2021, 5:41:40 PM5/7/21
to golden-cheetah-users
hummm I have no idea what you guys are talking about but it seams that this chart won't work with GC default installation, is that it?
Would you be kind of telling how to do it?
Appreciate.

Tks,

Ale Martinez

unread,
May 7, 2021, 5:50:44 PM5/7/21
to golden-cheetah-users
El viernes, 7 de mayo de 2021 a la(s) 18:41:40 UTC-3, marco...@gmail.com escribió:
hummm I have no idea what you guys are talking about but it seams that this chart won't work with GC default installation, is that it?

Yes
 
Would you be kind of telling how to do it?

marco...@gmail.com

unread,
May 7, 2021, 6:23:24 PM5/7/21
to golden-cheetah-users
I wish ...

I'm on of those non-tech mentioned "modules pre-installed, to allow easier access to curated Python charts on CloudDB for non-technical users." kkkkk

But tks anyway.

Ale Martinez

unread,
May 7, 2021, 7:22:55 PM5/7/21
to golden-cheetah-users
El viernes, 7 de mayo de 2021 a la(s) 19:23:24 UTC-3, marco...@gmail.com escribió:
I wish ...

I'm on of those non-tech mentioned "modules pre-installed, to allow easier access to curated Python charts on CloudDB for non-technical users." kkkkk

The reason this chart is not in the curated section is, precisely, because it uses modules not included in the standard distribution. We can include scikit-learn at some point to allow machine learning algorithms, but we need to check build time and binary size.

For this chart in particular, it seems to use scikit-learn just to fit a linear model, and there are alternatives like the one used in the script referenced in the first post or to use lmfit, which don't require it.


marco...@gmail.com

unread,
May 7, 2021, 8:08:53 PM5/7/21
to golden-cheetah-users
understood.
Thank you very much.

marco...@gmail.com

unread,
May 8, 2021, 1:48:00 PM5/8/21
to golden-cheetah-users
Hi Ale,

Please, one questions has remained unanswered:

" 1) Don't activities recorded by Golden Cheetah in Train mode have HRV RR intervals? here is the message I've got " NO HRV RR intervals found unable to create chart"

Thank you

A Evans

unread,
May 8, 2021, 3:52:38 PM5/8/21
to golden-cheetah-users
Great, thanks.

Installed Python 3.7.9 and the required packages from the Golden Cheetah Python guide. 
Of note Python 3.9 won't install the required sip package. So I went for 3.7.9 to match GC.

I had to specify the numpy version (pip install numpy==1.19.2) for tensorflow to install properly (although unlikely to use it). 

Now have a functioning custom python install. Yay.

Useful chart - matched my guesstimate of aerobic threshold to within 1bpm! Cool use of HRV that I seem to be collecting with each activity but wasn't sure what to do with it!

Thanks for help, and introducing me to this thread.

A

Ale Martinez

unread,
May 8, 2021, 5:11:53 PM5/8/21
to golden-cheetah-users
El sábado, 8 de mayo de 2021 a la(s) 14:48:00 UTC-3, marco...@gmail.com escribió:
Hi Ale,

Please, one questions has remained unanswered:

" 1) Don't activities recorded by Golden Cheetah in Train mode have HRV RR intervals?

Only when R-R capable HRM sensor is paired using ANT+.

Ale Martinez

unread,
May 8, 2021, 5:16:32 PM5/8/21
to golden-cheetah-users
El sábado, 8 de mayo de 2021 a la(s) 16:52:38 UTC-3, amlyn...@gmail.com escribió:
Great, thanks.

Installed Python 3.7.9 and the required packages from the Golden Cheetah Python guide. 
Of note Python 3.9 won't install the required sip package. So I went for 3.7.9 to match GC.

Right, you need to use Python 3.7.x for embedding in GC v3.6.

marco...@gmail.com

unread,
May 8, 2021, 6:21:49 PM5/8/21
to golden-cheetah-users
Hi Ale,

I played and recorded an workout using Golden Cheetah and my Garmin at same time using the same ANT+ HRM sensor.
The file saved in GC did not show R-R so I deleted the activity (made a copy first) and imported it from an original Garmin file which contain R-R.
Do I need any addition configuration at Golden Cheetah?

Thank you,

  PS: I'm getting an error on posting this message with both files attached.

Ale Martinez

unread,
May 8, 2021, 7:07:34 PM5/8/21
to golden-cheetah-users
El sábado, 8 de mayo de 2021 a la(s) 19:21:49 UTC-3, marco...@gmail.com escribió:
Hi Ale,

I played and recorded an workout using Golden Cheetah and my Garmin at same time using the same ANT+ HRM sensor.
The file saved in GC did not show R-R so I deleted the activity (made a copy first) and imported it from an original Garmin file which contain R-R.
Do I need any addition configuration at Golden Cheetah?

No, just an HRM capable to send R-R data (not all are) paired via ANT+

marco...@gmail.com

unread,
May 8, 2021, 7:26:09 PM5/8/21
to golden-cheetah-users

Do you how Garmin gets that info from the same sensor?

Ale Martinez

unread,
May 8, 2021, 7:30:45 PM5/8/21
to golden-cheetah-users
Marco, respectfully, I don't have any intention to continue another never ending interaction, it's enough for me.

Ale Martinez

unread,
May 9, 2021, 7:19:23 PM5/9/21
to golden-cheetah-users
El viernes, 7 de mayo de 2021 a la(s) 20:22:55 UTC-3, Ale Martinez escribió:
For this chart in particular, it seems to use scikit-learn just to fit a linear model, and there are alternatives like the one used in the script referenced in the first post or to use lmfit, which don't require it.

I've uploaded a v2 of this chart including only a simple change: replace the use of sklearn linear regression by numpy.polyfit so it can be used with included Python in GC v3.6, the rest of the code is unchanged.

It can be downloaded as "HRV Threshold estimation V2 (Py)" from the curated section of CloudDB for Activities. 

marco...@gmail.com

unread,
May 9, 2021, 9:22:36 PM5/9/21
to golden-cheetah-users
Awesome! 

Thank you very much.

Aitor Altuna

unread,
May 17, 2021, 9:14:03 AM5/17/21
to golden-cheetah-users
Ale, I assume each data point is the mean dfa alpha1 for the following 2-min section (data point x=10 will be the dfa alpha1 for 20-22min)?

Thank you

2021(e)ko maiatzakren 10(a), astelehena (00:19:23 (UTC+1)); Ale Martinez erabiltzaileak hau idatzi zuen:

Ale Martinez

unread,
May 17, 2021, 11:20:46 AM5/17/21
to golden-cheetah-users
El lunes, 17 de mayo de 2021 a la(s) 10:14:03 UTC-3, aitora...@gmail.com escribió:
Ale, I assume each data point is the mean dfa alpha1 for the following 2-min section (data point x=10 will be the dfa alpha1 for 20-22min)?

Yes, it uses a 2' window by default.

The chart script is just an adaption of Marco Altini's work, which is explained in great detail including use recommendations in https://github.com/marcoalt/Colab/blob/main/hrv_thresholds.ipynb

Ale Martinez

unread,
May 22, 2021, 5:26:34 PM5/22/21
to golden-cheetah-users
I've uploaded a new version adding AeT pace/power estimates with the same algorithm for AeT heart rate, that is linear regression using averages from 2 min segments:

HRV Threshold estimation V3 (Py).png

Will Schupp

unread,
May 30, 2021, 6:24:47 PM5/30/21
to golden-cheetah-users
This is great, but for some reason it says there is no HRV data from my 4iiii Viiiiva, which claims to provide accurate HRV data. Is there something obvious that I am doing wrong?

Thanks for this,
Will


--
_______________________________________________
Golden-Cheetah-Users mailing list
golden-che...@googlegroups.com
http://groups.google.com/group/golden-cheetah-users?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "golden-cheetah-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golden-cheetah-users/-uJoz99SqT8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golden-cheetah-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golden-cheetah-users/57160af2-3dd9-4ba0-86ff-4a17042fad95n%40googlegroups.com.

Ale Martinez

unread,
May 30, 2021, 6:58:18 PM5/30/21
to golden-cheetah-users
El domingo, 30 de mayo de 2021 a la(s) 19:24:47 UTC-3, Will escribió:
This is great, but for some reason it says there is no HRV data from my 4iiii Viiiiva, which claims to provide accurate HRV data. Is there something obvious that I am doing wrong?

Which configuration and data flow are you using to import R-R data from that HRM?

I've read it works with EliteHRV and GC can import R-R files from that App, I don't know about other configurations.

marco...@gmail.com

unread,
May 30, 2021, 7:55:53 PM5/30/21
to golden-cheetah-users
Hi,

I’ve been through this and apparently CG can not get HRV data from 4iiii but a Garmin device can. 
So instead of using the file recorded at Golden you import from the Garmin or any other logger. 

Regards.

PS : by the way Ale your last revision has made all sense to me. Thank you.

Adomas Karolis Uogelė

unread,
Feb 15, 2022, 4:18:42 PM2/15/22
to golden-cheetah-users
Hi Ale (and Marco), thank you for adding  DFA-⍺1 functionality to Golden Cheetah. May I suggest updating current version with very slight change to allow output all calculated values into console instead of defaulting to first 4 rows? This can be done at user level, however, I feel that those who are less familiar (like me) with coding, they might not be aware that they can get all values outputted to console. After quick google and test in my GC, the below worked for me, and I would think might be better default option than the current setup. I would think that many people who use GC would like to have both visual and data representation of each recorded data point. Do let me know your thoughts. Thank you!

Adding: 
# Default value of display.max_rows is 10 i.e. at max 10 rows will be printed.
# Set it None to display all rows in the dataframe
pd.set_option('display.max_rows', None)

and replacing
"print(features_df.head())" with "print(features_df)"

MyJunk Junk

unread,
Feb 15, 2022, 9:04:45 PM2/15/22
to golden-cheetah-users
So glad I saw this message. Although it took me a minute to actually figure out how to "download" the Chart.
>> It can be downloaded as "HRV Threshold estimation V2 (Py)" from the curated section of CloudDB for Activities. 

even had to go thru some posts from 2016 to figure it out.

pepe

unread,
Feb 16, 2022, 9:47:08 AM2/16/22
to golden-cheetah-users
Hi Ale,

Really enjoying this chart.

Is there a way to set the Chart to have the equivalent to Runalyze settings for DFA a1: window length to 120 seconds and window overlap field (in yellow) to 115, to produce the every 5 second recalculation?

Capturar.PNG

Many thanks

Ale Martinez

unread,
Feb 16, 2022, 10:49:51 AM2/16/22
to golden-cheetah-users
El miércoles, 16 de febrero de 2022 a la(s) 11:47:08 UTC-3, pepe escribió:
Hi Ale,

Really enjoying this chart.

Is there a way to set the Chart to have the equivalent to Runalyze settings for DFA a1: window length to 120 seconds and window overlap field (in yellow) to 115, to produce the every 5 second recalculation?

You would need to change the loop where the features are computed.

Capturar.PNG

That way you will have 24x data points, but highly correlated, not sure that is such a good idea when the objective is to do a linear regression over them.  

Ale Martinez

unread,
Feb 22, 2022, 9:01:44 AM2/22/22
to golden-cheetah-users

MyJunk Junk

unread,
Feb 23, 2022, 8:39:26 PM2/23/22
to golden-cheetah-users
This is what Marco had to say on twitter.
https://twitter.com/altini_marco/status/1495751966298976269?s=21

Snippet

5bd5bd7d4d789738f0b0e73f253b4cf5e63acbe8.png

Ale Martinez

unread,
Mar 15, 2022, 8:29:17 AM3/15/22
to golden-cheetah-users
El miércoles, 23 de febrero de 2022 a la(s) 22:39:26 UTC-3, mjunk....@gmail.com escribió:
This is what Marco had to say on twitter.
https://twitter.com/altini_marco/status/1495751966298976269?s=21

Snippet

5bd5bd7d4d789738f0b0e73f253b4cf5e63acbe8.png

He better explained his position in a recent blog: https://www.marcoaltini.com/blog/updated-view-on-hrv-analysis-during-exercise-and-dfa-alpha-1, I think it is relevant for this thread.
Reply all
Reply to author
Forward
0 new messages