The progress bar that doesn't convey any sense of progress (was Re: ...)

Maarten Bosmans mkbosmans at gmail.com
Sun Dec 13 08:46:12 GMT 2009


2009/12/11 John Arbash Meinel <john at arbash-meinel.com>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> You probably wanted to send this to the list. But thanks for doing the
> math for me. I probably could have worked it out but was being lazy. :)

Yeah, I sent it to the list now, thanks for noticing, mailing can be
hard sometimes apparently.

> ...
>>
>> With the above formula you don't need a loop anymore. Moreover, c can
>> be <1, so you can base the weight on a sampling interval 1s and when a
>> sample arrives in 0.4s you can just use the formula.
>
>
> Well, I think you meant 0.04s, but sure. That is certainly a nice
> property. (And that it doesn't have to be integral either, so you can
> handle 0.57s intervals.)

No, I ment 0.4s, because in this example I fixed the reference
sampling interval to 1s (instead of 0.1s), so 0.4s isn't a multiple of
the reference interval.


2009/12/11 John Arbash Meinel <john at arbash-meinel.com>:
>
> I guess my specific concern is that the sample rate is 'push' driven,
> and thus completely non-deterministic from sample to sample. I don't
> know whether that will matter in practice.
>

That's really no problem with this algorithm, right? It doens't matter
if you have one sample in ten seconds or 3 samples with the same value
in that same time period. The result after 10 seconds will be exactly
the same, but in the case of three samples the average gets updated in
between.

The main disadvantage of using exponential weighted averaging is that
past samples never fall out of the window, so there always a (rather
small) contribution of samples from a long time ago. For some
applications (e.g. audio processing) this can be considered an
advantage though, but I'm not sure that is the case here.

Maarten



More information about the bazaar mailing list