Re: histogram, how to trasfer from linear bins to logarithmic bin? [message #68145] |
Thu, 01 October 2009 11:59  |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
On Sep 29, 5:33 pm, JDS <jdtsmith.nos...@yahoo.com> wrote:
> On Sep 28, 6:54 pm, David Fanning <n...@dfanning.com> wrote:
>
>> Gavin Ge writes:
>>> HI, I have a question that now I get a set of datas, which are
>>> linearly binned into the histogram, but how to transfer it into a
>>> logarithmic bins?
>
>> Here is one way to create a histogram with logarithmic
>> bins:
>
>> http://www.dfanning.com/code_tips/logbins.html
>
> This would better be described as a way to create a histogram using
> any arbitrary bins of your own devising; pretty cool indeed, since you
> can design those bins in whatever way is useful. It does require you
> to sort your array beforehand, and so in this case would be less
> efficient than just taking the histogram of the log of your data.
>
> JD
As I mentioned in my value_locate essay, value_locate combined with
histogram can be very powerful! I'm sure you've already thought of
these, but two really good uses are:
(1) using reverse_indices to find out which elements fall into the
arbitrary bins (and all associated tricks based on reverse_indices)
(2) using histogram on very sparse data (which is how I solved the
histogramming-the-surface-of-the-sphere issue we were discussion)
-Jeremy.
|
|
|