Feature Request: Add alternative (quicker) density estimation options for `stat_density`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.8k
- Forks
- 254
- Avg merge
- 10h 35m
- Merged PRs (30d)
- 9
Description
I notice that in plotnine/stats/density.py there's support for several methods of calculating density but stat_density is locked into using statsmodels KDEUnivariate https://github.com/has2k1/plotnine/blob/a81b8f92bc39b6835e506e6779a01e4b8c53a627/plotnine/stats/stat_density.py#L177
I would love to be able to select a faster/more efficient method for computing densities so that performance can be more similar to seaborn in this respect.
Please let me know if I can help through a PR
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with plotnine/stats/density.py to review the available density methods, then inspect plotnine/stats/stat_density.py around line 177 where KDEUnivariate is selected. Compare the existing method interfaces and determine a concrete selection mechanism and completion criteria for faster density computation, with appropriate tests for stat_density.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100