#1905 Add support to PAI Health

Open
opened 1 month ago by sblaink · 8 comments
sblaink commented 1 month ago

The new products from Amazfit are equipped with a PAI score system that is backed up by science. TLDR of the study is: the 10k steps is not a good metric of phisical activity, the PAI it is. World Health Organization (WHO) and American Heart Association (AHA) both suggests to do 150 minutes per week of moderate-intensity aerobic activity or 75 minutes per week of vigorous aerobic activity [1][2].

It would be great to have the possibility to sync with their app or at least have the index calculated in gadgetbridge.

The new products from Amazfit are equipped with a [PAI](https://www.paihealth.com) score system that is backed up by [science](https://www.paihealth.com/science-of-pai/default.htm). TLDR of the study is: the 10k steps is not a good metric of phisical activity, the PAI it is. World Health Organization (WHO) and American Heart Association (AHA) both suggests to do 150 minutes per week of moderate-intensity aerobic activity or 75 minutes per week of vigorous aerobic activity [[1]](https://www.who.int/dietphysicalactivity/factsheet_adults/en/)[[2]](https://www.heart.org/en/healthy-living/fitness/fitness-basics/aha-recs-for-physical-activity-in-adults). It would be great to have the possibility to sync with their [app](https://www.paihealth.com/how-to-get-pai/default.htm) or at least have the index calculated in gadgetbridge.
belette commented 1 month ago

would it be great indeed to be able to follow this KPI into a graph or more

would it be great indeed to be able to follow this KPI into a graph or more
quelbs commented 4 weeks ago

As far as I figured out (see below), the algorithm is proprietary. From my point of view this means it cannot be included in Gadgetbridge. It might be a sollution to implement a similar rolling window activity indicator and not name it PAI.

Quote from https://support.paihealth.com/hc/en-us/articles/360010194833-:

PAI uses our own proprietary method to estimate VO2max based on your activity and biometric profile.

As far as I figured out (see below), the algorithm is proprietary. From my point of view this means it cannot be included in Gadgetbridge. It might be a sollution to implement a similar rolling window activity indicator and not name it PAI. Quote from https://support.paihealth.com/hc/en-us/articles/360010194833-: > PAI uses our own proprietary method to estimate VO2max based on your activity and biometric profile.
kojid commented 3 weeks ago

A similar indicator would be nice to see in GB indeed, also for “gamification” and battling with your friends ;)

A similar indicator would be nice to see in GB indeed, also for "gamification" and battling with your friends ;)
TaaviE commented 3 weeks ago

By analyzing a user’s heart rate, Mio’s proprietary, patented algorithm translates that data into a Personal Activity Intelligence number, or PAI.

Yeah I suspect GB would have to implement its own and call it something else.

> By analyzing a user’s heart rate, Mio’s proprietary, patented algorithm translates that data into a Personal Activity Intelligence number, or PAI. Yeah I suspect GB would have to implement its own and call it something else.
kojid commented 3 weeks ago

Just googled how PAI is calculated:
“PAI Score is based on your age, sex, resting heart rate, and your past 7 days of heart rate data. Each day any points earned 7 days ago will expire and your PAI Score will be recalculated. As your PAI Score increases, it will also become slightly more difficult to earn more PAI. As you continue to earn PAI, your score takes into account other factors such as previous PAI Scores, so it’s not as straightforward as simply adding your PAI Score each day.”
So lets create a similar formula 😅

Source: https://support.paihealth.com/hc/en-us/articles/360001056514-How-is-PAI-calculated-

Just googled how PAI is calculated: "PAI Score is based on your age, sex, resting heart rate, and your past 7 days of heart rate data. Each day any points earned 7 days ago will expire and your PAI Score will be recalculated. As your PAI Score increases, it will also become slightly more difficult to earn more PAI. As you continue to earn PAI, your score takes into account other factors such as previous PAI Scores, so it’s not as straightforward as simply adding your PAI Score each day." So lets create a similar formula 😅 Source: https://support.paihealth.com/hc/en-us/articles/360001056514-How-is-PAI-calculated-
fabz31 commented 3 weeks ago

Here is what I found to calculate PAI, following the links in one of the study :
https://ars.els-cdn.com/content/image/1-s2.0-S0002934316310695-mmc1.docx

Here is what I found to calculate PAI, following the links in one of the study : [https://ars.els-cdn.com/content/image/1-s2.0-S0002934316310695-mmc1.docx](https://ars.els-cdn.com/content/image/1-s2.0-S0002934316310695-mmc1.docx)
TaaviE commented 3 weeks ago

So lets create a similar formula 😅

It’s not very complex to implement and I’m doubtful that a simpler algorithm would net a better result. But PAI seems to be patent and copyright encumbered and that’s a nasty can of worms we probably don’t want to look into more.

I really suggest we don’t look into PAI more, and create our own implementation that gives the same end result of recommending people to do excercise.

I think it will be more complex to make it work consistently across all the supported devices because they all have some kind of error and bias in their measurements, comparing the results will probably be hard (“for “gamification” and battling with your friends ;)") if they aren’t adjusted.

> So lets create a similar formula 😅 It's not very complex to implement and I'm doubtful that a simpler algorithm would net a better result. But PAI seems to be patent and copyright encumbered and that's a nasty can of worms we probably don't want to look into more. I really suggest we don't look into PAI more, and create our own implementation that gives the same end result of recommending people to do excercise. I think it will be more complex to make it work consistently across all the supported devices because they all have some kind of error and bias in their measurements, comparing the results will probably be hard ("for “gamification” and battling with your friends ;)") if they aren't adjusted.
kojid commented 3 weeks ago

I really suggest we don’t look into PAI more, and create our own implementation that gives the same end result of recommending people to do excercise.

That’d be nice, yes

I think it will be more complex to make it work consistently across all the supported devices

You’re right, with “gamification” I am thinking of the score being some kind of motivation for the user himself (or, if comparable, to share it with friends who may own the same device). If the score falls, you will probably try to increase to a certain level again.

> I really suggest we don't look into PAI more, and create our own implementation that gives the same end result of recommending people to do excercise. That'd be nice, yes > I think it will be more complex to make it work consistently across all the supported devices You're right, with "gamification" I am thinking of the score being some kind of motivation for the user himself (or, if comparable, to share it with friends who may own the same device). If the score falls, you will probably try to increase to a certain level again.
Sign in to join this conversation.
No Milestone
No Assignees
6 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.