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

Wrong calculation toward Target Weight #93

Open
theAkito opened this issue May 21, 2024 · 3 comments
Open

Wrong calculation toward Target Weight #93

theAkito opened this issue May 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@theAkito
Copy link

Describe the bug
The calculation of how many days are needed to reach target weight based on previous data is wrong, if the user sets a weight of for example 66.6 yesterday and today 66.7.

To Reproduce
Steps to reproduce the behavior:

  1. Set historical data, from past six months. Historic data is sporadic and not daily.
  2. Notice correct days left calculation.
  3. Set yesterday's weight to 66.6.
  4. Set today's weight to 66.7.
  5. See calculation being completely wrong, saying for example, target weight will never be reached.

Expected behavior
Calculations should stay correct, even if providing daily data.

User Information:

  • Device: POCO X3 NFC
  • OS: Custom ROM
  • Version: Android 11
  • Downloaded: F-Droid

Additional context
I didn't have the opportunity to double check and definitely reproduce that it works in a faulty way with any number. Maybe it only happens in certain number ranges. I don't have time to check now.

@theAkito theAkito added the bug Something isn't working label May 21, 2024
@braniii
Copy link
Contributor

braniii commented Jun 4, 2024

Hi @theAkito, thank you for taking the time of opening an issue report :) However, I am not sure if I understand the bug correctly. What is the correct calculation you are expecting? And which interpolation strength are you using?

@theAkito
Copy link
Author

theAkito commented Jun 4, 2024

What is the correct calculation you are expecting?

If historic, nevertheless sporadic, data clearly shows a trend of, for example, losing weight, which the app reflects correctly, but then data for yesterday, for example, 66.6 and data today, for example 66.7, is added, the app shouldn't put 100% weight into the last two data points, but rather keep calculating based on all historic data.

This means, that just because there was a jump by 0.1 from yesterday to today, the app shouldn't tell the user, that the goal of, in this example, losing weight will never be reached, as based on historic data, this 0.1 gain is negligible and irrelevant, based on long-term data.

To be even more precise: the app shouldn't show negative weight loss, just because of 2 data points, when historic data shows, that weight is positively lost, in the long term.

And which interpolation strength are you using?

I am not sure, what you are referring to.

@braniii
Copy link
Contributor

braniii commented Jun 5, 2024

signal-2024-06-05-19-09-16-821.jpg

I guess this should be handled by the interpolation strength, so the number of days considered for estimating the smoothed curve and therewith estimating the slope. Did you try if setting a stronger interpolation strength (see image) helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants