-
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
Values below xmin are sliently trimmed when computing cdf or pdf #36
Comments
Thanks for using Is there a problem with using
(The second line will plot a PDF that is normalized to the fitted data, not all the data, and thus will appear higher than the first PDF. This is awkward and people have talked about implementing an option in |
IIRC, your parenthesized note is exactly why I decided to directly call |
I'm confused. I don't understand what you're trying to do, and how the On Wed, Jun 1, 2016 at 4:58 PM, Antony Lee [email protected] wrote:
|
I want to plot the fitted pdf and have it (more or less) overlaid on top of the empirical pdf, i.e. the fitted pdf should be plotted normalized to the whole dataset. This is exactly the "awkwardness" you mention above. |
I'd rather fix the pdf/cdf/ccdf calculations themselves. Silently dropping data feels... wrong, doesn't it? |
I think there's a conceptual issue: Fit.pdf() and Fit.plot_pdf() plot an On Thu, Jun 2, 2016 at 1:48 AM, Antony Lee [email protected] wrote:
|
I fully agree with you on this point, but in my opinion this means that |
Ah, I see! I suppose the question is whether it should return 0, or Again, though, this line of thinking seems to be for a use case (in the original comment) that's a bit weird: |
How would the last option ( I don't actually really care whether you return 0 or |
"How would the last option (plt.plot(results.power_law.cdf(xs))) work? It won't be correctly aligned in x. The first approach (plot_cdf) would need scaling, which is a separate issue." "I don't actually really care whether you return 0 or nan. In fact even raising an exception would be fine with me (well, it would be not as good, but still OK). Silently dropping values, not so much." If you implement such functionality I'm happy to include it! The same goes for the scaling. |
xmin
is ~2.28, and the last two lines give identical results: the entries 0, 1 and 2 ofnp.arange(10)
have been silently trimmed out, when I'd expect them to return 1 (and 0 if computing the pdf). Otherwise, it becomes a bit awkward to e.g. doplt.plot(xs, results.power_law.cdf(xs))
if I am not directly computingxs
usingxmin
.The text was updated successfully, but these errors were encountered: