ui suggestion: use quantiles of the effort distribution to pick the effort's color #10
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: P2Pool/consensus#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The distribution of efforts follows a standard exponential and that means we know its quantiles/percentiles explicitly. I left a derivation of that claim together with a figure, data, and statistical tests here https://pastebin.com/EXXKm50D. This has already been shown somewhere before I'm sure but I can't be bothered to look for it.
Once we know that, we look at the 5th, 25th, 75th, and 95th percentiles of the standard exponential and they tell us that
What I suggest is to use those to pick the color of efforts in the observe, something along the lines of light blue, green, neutral, yellow, red.
Better yet just straight up plug the effort
f
in the CDF1 - exp(-f)
and feed that to a diverging colormap. That would in effect be like doing histogram equalization.The reasoning behind this suggestion is that the average effort (100%) is not an indicator of what's typical or not, and therefore of good and bad luck. Indicators based on quantiles are by construction better suited for that, especially in the case of asymmetric distribution like the exponential, because they are uniform in probability. Chopping the effort range arbitrarily with green for 0-100%, yellow for 100%-200%, and red for 200% and above, skews the expectation of beginners and funnels them to r/monero where they will start yet another "p2pool unlucky and bad?" thread after they get spooked by their second or third 200% share.
Proof of concept. I'm using
prob = 1 - exp(-effort / 100)
, rescaled from [0, 1] to [0.15, 0.8], and fed into the reversedRdYlBu
color map. It fits well with the current muted color scheme and is easy on the eye. I never programmed in go but this is very simple and I could always give it a try and add an alternative toeffort_color()
incmd/web/views/funcs.go
. Feel free to close the issue, I'm happy to let it go as well.This looks neat! Maybe p2pool.io can also use the same coloration, currently p2pool.observer tries to match their color/values.
For future reference, this is the contents of the linked pastebin for statistical tests:
Used the same gradient and rescaling as tested. Will later do some further tests to see what works best!
Implemented in live observers
Just noticed this was implemented! Nice!
Another thing that may be worth trying is to use the
RdYlGn
colormap instead ofRdYlBu
. It's basically identical and creates the same muted aesthetic, but uses green instead of blue. I'm partial toRdYlBu
, but that could align a bit more with p2pool.io if you prefer that.