sleepers-anonymous/zscore — pull request #31 by luac (2013-11-07 00:03:02+00:00)
Title: Add cScore and cScore1 metrics.

Also tweak consistencyStat and consistencyStat2 to use numpy (and share code with each other and cScore), and clean up some other functions a bit.

From descriptions in FAQ:

The cScore metric is a way of combining amount of sleep with consistency: it's the product of avg and consistent. Another way to look at this is that it's an average of your sleep weighted by time of day, where the weight associated with a time corresponds to the probability that you were asleep at that time on a random day.

The cScore1 metric is another way of combining sleep with consistency. This is the average of your sleep only counting when you were asleep at the same time of day twice in a row, or equivalently, how much your sleep times overlap from each day to the next. So named because it's a variant on cScore where the weight only depends on the times you were asleep on the previous day, rather than your distribution of sleep over all days.