Suggestions
Average energy takes time into account.
Example data:
00:00 - 5 23:58 - 1 23:59 - 5
Result 3.7 Expected : 24h x 60m = 1440m 1339 * 5 + 1 * 1 / 1440 = 5.0 (4.99999…)
Algorithm 1: An entry indicates start time of the mood Algorithm 2: An entry indicates end time of the mood (in which case; 1438x1+2x5/1440=1.03) Algorithm 3: an entry indicates I’m in the middle of the mood (2.5) Algorithm 4: instead of a stepwise function, draw a line to interpolate values in between timestamps.
Now I just add a lot of measurements to simulate this scenario.