stacks-archive / app-mining

For App Mining landing page development and App Mining operations.
https://app.co/mining
MIT License
49 stars 16 forks source link

Division by zero bug in z-score calculations #200

Closed njordhov closed 4 years ago

njordhov commented 4 years ago

What is the problem you are seeing? Please describe.

The calculation of z-scores will fail with a division by zero if all apps have the same values.

How is this problem misaligned with goals of app mining?

It creates an undefined situation.

What is the explicit recommendation you’re looking to propose?

Consider using zero in place of the z-score when the standard deviation is zero.

Describe your long term considerations in proposing this change. Please include the ways you can predict this recommendation could go wrong and possible ways mitigate.

Better fix it now before the bug is committed to a hard to change Clarity contract... ;)

Additional context

199

hstove commented 4 years ago

Thanks again for getting into the nuance of the scoring system and finding these things.

I am inclined to address this when and if it happens. If it did happen, we can easily customize the formula to give a 0 to all apps in the case of an error - which is what their score should be in that scenario, anyways.