-
-
Notifications
You must be signed in to change notification settings - Fork 82
Design꞉ Habit Score
This wiki was written based on version 1.72.2+95. Any subsequent changes are subject to the in-app behavior.
The habit growth curve is based on a Sigmoid function.
For a day x in [0, days], map it to [-10, 10]:
Where:
-
$a_1 = 0$ ,$a_2 = \text{days}$ -
$b_1 = -10$ ,$b_2 = 10$
So explicitly:
Where:
-
$k = 0.4$ (growth rate) -
$x_0 = 0$ (center point)
If the output should be mapped from an interval
Where:
$[c_1, c_2] = \text{interv}$ -
$[d_1, d_2] = _defaultInterv$ (Default: [0, 100])
This function calculates the day x corresponding to a given habit score y, i.e., the inverse of the habit growth curve.
First, map the output y from an interval
Where:
$[c_1, c_2] = \text{interv}$ -
$[d_1, d_2] = _defaultInterv$ (Default: [0, 100])
The Sigmoid inverse (logit function) is applied:
Where:
-
$k = 0.4$ (growth rate) -
$x_0 = 0$ (center point)
Finally, map X from [-10, 10] back to [0, days]:
Where:
$[a_1, a_2] = [0, \text{days}]$ $[b_1, b_2] = [-10, 10]$
So explicitly:
- Target Days: Minimum number of days required to complete a habit.
- Daily Goal: Minimum quantity required for single day.
- Incomplete: Daily Goal completely not completed; in positive habits, this is usually 0.
-
Partially Completed: Daily Goal not completed; for positive habits, the value is usually with
0 < num < Daily Goal. -
Overachieved: The final number exceeds the value set for the Daily Goal, usually with
num > Daily Goal - Overage Threshold: Maximum value the number can increase after exceeding the Daily Goal
For a positive habit, when the
For a negative habit, simply replace
For a positive habit, when the
For a negative habit, simply replace
When the number exceeds the Overage Threshold, take the maximum value (

Github | F-Droid | LzzLzzyOnDroid | Flathub