raae / pow-app

Take charge of your menstrual cycle with POW! — the privacy-first menstrual cycle journal
https://www.usepow.app/
GNU General Public License v3.0
33 stars 2 forks source link

Prediction engine #44

Open raae opened 4 years ago

raae commented 4 years ago

I need an ok prediction engine that lets the user know what they have tagged around the same time in their cycle before. This could be to check if feeling, for example, exhausted is normal for them or not at that time in their cycle.

The current code can be found here https://github.com/raae/pow-app/blob/master/src/store/useCycle/utils.js.

I find each cycle by checking for menstruation tags 14 days or more apart. This lets users skip logging their menstruation a day without indicating a new cycle.

Then i add the tags from each day in the cycle to a dictionary with the key being days since the first day in the cycle.

The problem with this is that cycles are not usually exactly the same length. So the cycles should be normalized in some way. As something happening two days before the next menstruation in one cycle might not even show up if the average cycle is two days shorter.

regexident commented 4 years ago

In March 2017 Clue and WATTx held a hackathon on Berlin for which, while the proprietary data unfortunately remains unavailable, some of the participants' code is available on GitHub:

I guess an important step would be to collect anonymized volunteer data to train/test the engine on/against.

raae commented 4 years ago

Thank you for chiming in. Open code and issues on GitHub is the best :D

regexident commented 4 years ago

🤜🏻🤛🏻😃

I have far too much stuff on my plate already, but figured the least I could do is share what I know, starting with what others have already to work/not work. 🙂

raae commented 3 years ago

Some terms for googling: linear regression (maybe some machine learning).

raae commented 3 years ago

I have reached out to a data science person in Oslo that hopefully can do some consulting.

regexident commented 3 years ago

Some terms for googling: linear regression (maybe some machine learning).

Also: "seasonal time-series forecasting"