[pondus-dev] Trend component?

Eike Nicklas eike at ephys.de
Mon Jan 12 15:56:51 EST 2009


resending since mailman was down and mailing list emails were not
delivered]

Hi Ricardo,

thanks a lot for your email!

On Wed, 17 Dec 2008 00:18 +0000, "ricardo cabello"
<info at ricardocabello.com> wrote:
> 
> The idea is to have a new line on the Plot view. I'm not sure the name
> of the component, I think it's Trend component. This line helps you to
> see on average how you're doing. Usually stats go up and down, but you
> don't know exactly if you are going up or down in average. With this
> line you can see if you're going down easily once you add a new day
> weight.
> 

A similar suggestion has been made in August
(http://sharesource.org/pipermail/pondus-dev/2008-August/000001.html),
although that one was more concerned with smoothing the graph...

Your idea sounds like an interesting feature. I would like to implement
something like this once I find the time!

> To get this line, you would count every number on the database and do
> this:
> 
> Day 1, 90, (Day 1) / 1 = 90
> Day 2, 91, (Day 1 + Day 2) / 2 = 90.5
> Day 3, 92, (Day 1 + Day 2 + Day 3) / 3 = 91
> Day 4, 89, (Day 1 + Day 2 + Day 3 + Day 4) / 4 = 90.5
> ...
> And so on.
> 
> It basically does kind a smooth to the stats and it's easier to see
> what is going on.

So that algorithm calculates the average weight over all past
measurements. That probably give a good feel for the trend, but the
absolute values become meaningless if, for example, you weighed 90kg
for 3 years and then quickly drop down to 80kg. In this case, the
average will still be close to 90kg...

For me, it would sound more intuitive to average over a fixed time
span, for example to replace each datapoint by the average over the
last week or by the average over all measurements within +- 4 days.

Both of these algorithms might have problems if the weight measurements
are not done regularly, e.g. if you measure your weight daily for one
month and then only once in the next 4 months, because the single
measurement will not have enough weight (maybe I should rather say
impact, in this context ;-) ).

Anyway, I should probably play around with different algorithms and
test how they behave. Another option might be to look at splines
( http://en.wikipedia.org/wiki/Spline_(mathematics) )...

This sounds like an interesting problem. It would be nice to have a
smoothed graph, that clearly indicates the trend of one's weight!

Thanks for the suggestion, I will let you know when I have a possible
implementation for this.

Have some nice relaxing holidays,

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://sharesource.org/pipermail/pondus-dev/attachments/20090112/da066f94/attachment.bin 


More information about the pondus-dev mailing list