Add a text for displaying values on histogram.#1496
Conversation
For the histogramm, I add text for displaying the percentage of each bar, same as for values_count. I try to reuse the ideas of display value for displaying on the histogram
[doc build]
[doc build]
[doc build]
|
Hey @lionelkusch thank you for this PR! #1454 is kinda tricky and we're not sure how to move forward. Your suggestion is interesting, but my understanding is that we'd rather have the height of each vertical bar rather than the percentile of their distribution. Additionally, we'd also like to have the total count for the categorical distribution (displayed horizontally). We need to see whether adding these figures would take too much space to be useful or not. We can use this PR to explore different options. |
|
This PR is quite limited to add information to the histogram is the same spirit as for the value_counted. |
I agree on all points here and I would also prefer having both numbers visible at the same time.
How about adding the % to the right (the top) of the plot, aligned with each bar? With a fixed format (like 3 significant digits) the space should remain mostly constant, while the actual value is still represented in the same way as it is now. If the % sign takes too much space, it could be added above the column of numbers as an annotation. Originally posted by @rcap107 in #1506 (comment) I put back the comments of the PR #1506 about the graphic representation. |
|
I quite like the current version, thanks a lot @lionelkusch! I just realized is that we might want to remove the % numbers for numerical features, because bins for numerical values are defined somewhat arbitrarily, so the % numbers for them are not really meaningful. |
|
Hey @lionelkusch, do you think you finish this PR? As we discussed, the current version is good, the only change would be removing the % from the numerical columns I hope there won't be too many conflicts to deal with |
|
@rcap107 I am sorry, I forgot to do the modification. |
|
Is there a place where I can look at a full HTML version, to interact a bit with it? |
I was comparing the table report in the homepage of the generated docs with that in the live version |
|
I removed the tick line; I think it's not needed it for the readability of the figure. |
|
Hey @lionelkusch, I keep on losing track of this issue 🙈 my bad We can merge after removing the barplot labels for the numerical features, like here The bins are decided arbitrarily, so the size of each bin is not particularly informative. (I thought I had already mentioned this here, but I guess I forgot) |
|
Are you sure that you want to remove the label? |
#1454 mentioned both categorical and numerical features, but given that the distribution of numerical features is generated with "best effort" bins, the actual value of the bins isn't very meaningful, so I think it can be removed. For categorical features, each category is well delimited so it makes sense to have both the number of occurrences and the %, so the current version is good and should remain as you wrote it. |
|
done |
rcap107
left a comment
There was a problem hiding this comment.
Looks good to me, thanks a lot @lionelkusch. It was a bit convoluted (my fault for that), but the result is a nice addition to the TableReport.
|
Thank you all for merging this PR |






For the histogram, I add text for displaying the percentage of each bar, the same as for values_count. I try to reuse the idea of display value for displaying on the histogram.
This pull request was made for fixing the issue #1454.