Skip to content
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

spline_pdf efficiency issue #110

Open
maxwest-uw opened this issue Aug 16, 2022 · 0 comments
Open

spline_pdf efficiency issue #110

maxwest-uw opened this issue Aug 16, 2022 · 0 comments
Labels
bug Something isn't working parameterization new/upgraded PDF parameterization need

Comments

@maxwest-uw
Copy link
Collaborator

when trying to get scipy.stats (mean, var, std etc.) for a spline_pdf ensemble, the runtime is increased exponentially when compared to every other pdf function.

  • discovered this when trying to add a _run_ensemble_funcs test for splines in test_ensemble.py, with a single test runtime jumped from ~30 seconds to 90 seconds
  • I was able to narrow it down to the fact that the spline_pdf class is the only qp pdf function that doesn't implement its own ._ppf method. the native scipy way of calculating ppf for splines seems to be very inefficient and gets called multiple times when trying to calculate the mean (due to the fact that scipy has to integrate over the function)
  • should be able to make it run faster if we do a similar implementation to the one in interp_pdf._ppf (as suggested by Alex)
@aimalz aimalz added the bug Something isn't working label Nov 8, 2022
@aimalz aimalz added the parameterization new/upgraded PDF parameterization need label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parameterization new/upgraded PDF parameterization need
Projects
None yet
Development

No branches or pull requests

2 participants