Uniform and Normal Distribution Performance Improvements
Wrote functions for Uniform pdf, cdf, icdf and Normal pdf, cdf that are faster than SciPy implementations
Description
Wrote the analytic formulas for Uniform distributions into functions for the class. Wrote new functions for Normal pdf and cdf that were faster than SciPy while maintaining accuracy. Normal InverseCDF (icdf) was not written because we could not write a fast implementation that was as accurate as SciPy. The normal icdf is still a call to the scipy implementation.
Motivation and Context
Algorithms that required many, many distribution calls were quite slow. This makes uniform and normal calls significantly faster.
How Has This Been Tested?
Extensive tests were written for the analytic answers to uniform distributions. Normal distribution is compared to the SciPy implementation for accuracy.
Types of changes
What types of changes does your code introduce? Put an x in all the boxes that apply:
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
Go over all the following points, and put an x in all the boxes that apply.
If you're unsure about any of these, don't hesitate to ask. We're here to help!
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
Uniform and Normal Distribution Performance Improvements
Wrote functions for Uniform pdf, cdf, icdf and Normal pdf, cdf that are faster than SciPy implementations
Description
Wrote the analytic formulas for Uniform distributions into functions for the class. Wrote new functions for Normal pdf and cdf that were faster than SciPy while maintaining accuracy. Normal InverseCDF (icdf) was not written because we could not write a fast implementation that was as accurate as SciPy. The normal icdf is still a call to the scipy implementation.
Motivation and Context
Algorithms that required many, many distribution calls were quite slow. This makes uniform and normal calls significantly faster.
How Has This Been Tested?
Extensive tests were written for the analytic answers to uniform distributions. Normal distribution is compared to the SciPy implementation for accuracy.
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Checklist:
Go over all the following points, and put an
x
in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!