Pre-binned distribution/histogram
See original GitHub issue🚀 Feature
A user should be able to create an aim.Distribution
using histogram data that the user computed. Perhaps by specifying some flag that disables the automatic internal numpy.histogram
.
Motivation
Sometimes the exact histogram is known, rather than needing to a sample it from some random source.
Pitch
counts = [4, 2, 1]
bin_edges = [0, 9, 18, 99] # or bin_midpoints?
aim.Distribution(counts=counts, bin_edges=bin_edges)
Alternatives
Plotting a typical plot.ly figure instead.
Additional context
N/A
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Histogram based on pre-binned data (center of a bin given)
A possible workaround is to recalculate the beginnings of the bins separately and then feed them into the ListPlot, but I am wondering...
Read more >How to Plot a Pre-Binned Histogram In R - Stack Overflow
I'd like R to plot a histogram of this data by doing further binning and summing the existing counts. For example, if in...
Read more >Histograms review (article) | Khan Academy
A histogram displays numerical data by grouping data into "bins" of equal width. Each bin is plotted as a bar whose height corresponds...
Read more >Histogram Bin Size
Determining how many histogram bins should be used for estimating distributions is a problem in non-parametric statistics, although histogram-based methods ...
Read more >How to choose the bins of a histogram? - Your Data Teacher
A histogram is a representation of the probability distribution of a ... to perform pre-processing tasks in machine learning projects.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Attempt 2 (much cleaner):
In terms of the API, does this new
__init__
interface seem reasonable?Usage:
Supporting both
data
and(hist, bin_edges)
makes it look a bit more complicated than, e.g. deprecatingdata
and forcing the user to donp.histogram
themselves whenever they need it.Also, is there a reason behind setting
bin_count=512
as the max?