-
Notifications
You must be signed in to change notification settings - Fork 193
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
'Shortcut' in fitting Histogram if binning is uniform / even #563
Comments
after some fiddling I have concluded this should be done at
Potentially we would have some gain:
|
bump for pointer to where to implement this since it looks like we shouldn't miss a ~ x10 improvement |
For large histogram fitting at scale it might also be good to make it work by passing the value-count pairs as well. That is probably a different approach for histogram with numerous data... currently I use the value-count pairs and run a bar plot since histogram can't handle that scale. |
@Nosferican huh? how did you obtain the value-count pair in the first place? also this is not only for 1D but also higher dimension. |
Something like |
won't work if I have continuous data. |
Aye. For continuous data you need to |
update:
if we replace the
we immediately get slow down
|
basically it comes down to we shouldn't use base
|
I’d rather say let’s check if search sorted could be made faster here |
We could, of course, add a method https://github.com/JuliaLang/julia/blob/28330a2fef4d9d149ba0fd3ffa06347b50067647/base/sort.jl#L232 |
I wonder why searchsortedfirst takes so long, though - but it should run in constant time. |
StatsBase.jl/src/hist.jl
Lines 229 to 235 in 3762c78
if binning is even, we can do a
O(N)
edge finding, this is useful when fitting large number of events.The text was updated successfully, but these errors were encountered: