Use uniform distribution in timeseries
demo
#8020
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was putting together a demo using our
timeseries
utility and noticed generating random integers can take a significant amount of time -- especially when generating a DataFrame with many columns. After digging in a bit deeper, this is because we're generating integers from a Poisson distributiondask/dask/dataframe/io/demo.py
Lines 16 to 17 in da24582
which can be an order of magnitude slower than from, for example, a uniform distribution:
This PR proposes we switch to using a uniform distribution for generating random integers.
cc @rjzamora who has recently worked with our
timeseries
utility