-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdf-distribution for values <1 #33
Comments
Thank you very much for considering this use case and writing a solution Can you make this edit as a pull request? It may also be worth testing out On Sat, May 14, 2016 at 10:38 PM, Cils notifications@github.com wrote:
|
I noticed, that the values below 1 are not included in the pdf-distribution of the data (powerlow.pdf(), fit.plot_pdf()). For some reason unknown to me, the histogram logarithmic spaced bins boundaries are transformed to integers.
line 1952 in powerlaws.py:
bins=unique(floor(logspace( log_min_size, log_max_size, num=number_of_bins)))
In this way a potential infinite number of bins are eliminated.
I modified the function "pdf" to solve the problem. The data are rescaled by multipling them by xmin before the histogram is computed. At the end the bins boundareies "edges" are transformed back to the original scale and returned.
Below the code:
The text was updated successfully, but these errors were encountered: