Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Index: New feature? #704

Closed
Chrisx68 opened this issue Nov 25, 2018 · 20 comments
Closed

Running Index: New feature? #704

Chrisx68 opened this issue Nov 25, 2018 · 20 comments
Assignees

Comments

@Chrisx68
Copy link

I could provide a code to calculate a Running Index based on the heart rate and speed data. The Running Index would show you how efficient you are running and the value would be close to the Running Index of Polar TM (see here https://support.polar.com/en/support/tips/Running_Index_feature). The higher the value, the better is your running performance.

This would be another good feature of elevate!

@lkj19zpdiDDe
Copy link
Contributor

I'd be interested in learning more about the index, and I may have the time to implement it.

@Chrisx68
Copy link
Author

Chrisx68 commented Mar 5, 2019

That would be great. I could send you more information how it is calculated and also the code for a garmin data field for this. Please let me know where to send.

@lkj19zpdiDDe
Copy link
Contributor

Attaching it to the ticket would be great.

Also, just to confirm, are you the owner of the calculation and donating it to the project or is the calculation public information? (I'm extra cautious on IP and confidential information protection.)

@OndrejSpanel
Copy link
Contributor

I already had a PR #386 which aimed to compute both running and biking index and displayed it in the fitness graph. The PR was before a big refactorization, I am not sure what are the chances of it being ever merged, it is closed now with a reference to #549

@Chrisx68
Copy link
Author

Chrisx68 commented Mar 7, 2019

Yes I am the owner of the calculation and would donate it for the project.
What I did was fitting the running performance prediction table which available on polar's website: https://www.polar.com/en/smart_coaching/features/running_index/chart
The result of the fitting was a formula for the running index (left column) based on the running speed and distance. This formula is valid for runs when performing maximal. In a second step a correction was added to take into account also runs at submaximal Heart rates. The basis for this correction was own data as well as public available data.
So in my opinion there is no IP violation as the chart on polar's website is public information and the calculation is done by my own. To be on the safe site, we could call it "running performance index" to be different to polar.

The following parameters are needed:
t running time (minutes)
d Equivalent running distance (meters) d = run distance (from strava) + 6up - 4down
This takes into account when the track is hilly. d is the equivalent distance for a flat track.
up ascent meters of the run
down descent meters of the run
HR Mean heart rate
HRmax Maximum Heart rate

Calculation:

Running Index = RI0 / x
RI0 = 213.9 / t * (d/1000)^1.06 + 3.5
x = HR/HRmax * 1.45 - 0.30 (x should be truncated to 0..1)

@lkj19zpdiDDe
Copy link
Contributor

@Chrisx68 Thanks for the details. I've tested the calculation with my recent runs, and it looks predictive to me.

@OndrejSpanel Any feel for this approach vs. your original approach? Is one more predictive than the other? I also like how your version also works for biking.

@OndrejSpanel
Copy link
Contributor

The computation looks similar, however at least the - 0.30 part at the end of the formula should be replaced with proper compensation for standing HR. The result will be very similar for most people, but for people with unusually low or high standing HR I think using their standing HR will be more precise. I will try to do more detailed comparison in a few days, too busy now.

The crucial part of the article I was basing my work on is:

To calculate the baseline value, you start with two data points: your standing heart rate at rest (which corresponds to a running speed of zero), and your heart rate and running speed at VO2max. Then you draw a straight line between those two points, because research shows that speed increases as a roughly linear function of heart rate (as long as you're not going too close to all-out). That gives a straight line that tells you, in theory, what speed should correspond to what heart rate (and vice-versa).

See Tracking Fitness With the "Heart Rate-Running Speed Index"

@lkj19zpdiDDe
Copy link
Contributor

PR 790 (#790) created for this. (Since this is my first time in the code, I'm sure I've missed things and the review might take a while.)

@OndrejSpanel I reviewed the article and prior implementation, and I couldn't get the index to be consistent across my runs.

@Chrisx68
Copy link
Author

Chrisx68 commented Mar 9, 2019

Here is a figure which shows the correlation between the running index by polar (y axis) versus the result using the above mentioned calculation (x axis). The fit is very close to polar's result.
image

@Chrisx68
Copy link
Author

Chrisx68 commented Mar 9, 2019

@OndrejSpanel The computation looks similar, however at least the - 0.30 part at the end of the formula should be replaced with proper compensation for standing HR.

Here is the basis for the correction (based on more than 100 runners). It follows very well the equation y=1.45 x HR/HRmax - 0.30.

image

@OndrejSpanel
Copy link
Contributor

I am not sure I understand what do you correlate to what. Are you correlating your performance index against the polar index, or against some objective or subjective running performance?

@Chrisx68
Copy link
Author

It's the first: I am correlating my running performance index against the polar running index. The data were taken from the polar flow website.
The second figure shows the correction factor x against the heart rate in % of HRmax. Did that help you?

@OndrejSpanel
Copy link
Contributor

Thanks for explanation. The high correlation therefore says you almost precisely estimated how Polar computes their index. I am not much convinced polar running index is a meaningful way to indicate a performance, though. The article I am referring to seems more reliable to me, as they publish what data are they based upon and refer to the study. I think am not the one to judge and accept or reject this eventually, though.

@thomaschampagne
Copy link
Owner

thomaschampagne commented Jul 6, 2019

Closed by PR #790. Now on develop. Thanks for the brainstorming and analysis

@jonaganoj
Copy link

Thanks for a great index. I have a question;

I have looked at the formula given by Chrisx68:
Running Index = RI0 / x
RI0 = 213.9 / t * (d/1000)^1.06 + 3.5
x = HR/HRmax * 1.45 - 0.30

Since (d/1000)^1,06, the distance in km is only used in the exponential expression (^1,06), (and not for example t/d - the pace), the index will be higher the longer the distance, even if the speed and HR is constant. Is this correct and as it is implemented in elevate? Or have I understood the formula wrongly?

@Chrisx68
Copy link
Author

The idea behind is the equivalent running performance as also described here:
https://wismuth.com/running/calculator.html
When you run 20km instead of 10km you will need more than twice the time as your speed will decrease with longer distances. This fact is considered in the exponent 1.06. With the same performance (same RI and HR), doubling the distance will increase the running time t by factor of 2.085 (=2^1.06). Does this answered your question?

@jonaganoj
Copy link

Thx! Sure this answers a lot and I suspected 1.06 was maybe related to the doubling factor of distances in running. But then the formula can only be used on the complete distance of the workout and not on parts or laps as the running index will be calculated lower for each lap compared to the sum of laps. What it also means is that RI is not a paralell to VO2 which is not depending on distance runned (ref the Polar table showing RI for Cooper test distance and comparing to VO2 max). But I initially thought the RI was a function of pace and HR and not actual total distance of run. I would have preferred this since I then could have used it to estimate fitness in the form of "VO2 max" or something, but since RI is defined by others this is not an option. I use it to track my improvement and may change the use by removing the power of 1.06.

@Chrisx68
Copy link
Author

The idea was to be as close to the Polar's running index as possible. And the RI by Polar is also dependent on the total distance as it can be seen from Polar's table. For the same RI, doubling the distance (e.g. from 5 to 10 km) leads to more than twofold longer running time.
Actually, Polar claims on their website that the RI is an estimation of your maximal oxygen uptake Vo2max. So in my opinion it can be used to estimate your vo2max.

@jonaganoj
Copy link

I thought vo2max was mostly connected to the absolute speed or pace of running and not length. if I run 1 or 2 km at say an aerob level (submax) I did not expect the VO2 consumption to change. But, there might be much more complex relationsships than I am aware of.
Of course when length really increases other aspects come into play, for instance glucogen levels, efficiency, etc.

thanks for the insights :-)

@Constantinepapp
Copy link

i use both polar and elevate and i can say that elevate equation stays more consistent from run to run than polar's. This doesnt says much of course also in this kind of data it is better to look at the trends. My best friend who is an triathoner found that the fitting trend of the polars running index matches his tested vo2max with little error. Also have in mind that there is a table to convert polar's running index to vo2max there are not supposed to be equal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants