-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add inverse transform sampler #71
Conversation
…ing 424242 bytes.
Add back optimization flags (were disabled to rule out problems). Space vs tab indentation.
Extra CMake modules for building boost within project.
Forcing code to use version of Boost that is automatically built.
Modifying tolerance of unit test to account for slightly larger numerical errors incurred during matrix inversion for certain compiler settings.
Tolerances updated for compatibility with MingW Tudat#10
Fixed include guard.
Modification to address unit test failure Tudat#13 (comment)
With unit test fixes for Boost 1.60.
…7/tudat into Reneh107-add_numerical_quadrature
…quadrature Reneh107 add numerical quadrature
Fixed minor style issues in recently committed code
…y_distribution Merging probability distribution code from Reneh107 and DominicDirkx into the repository. The Gaussian Cupola unit test is not ideal, but no better option has as yet been identified. A note has been added to the code to indicate this.
…yle and commenting issues not yet addressed
…pling Reneh107 add random sampling
…sity Reneh107 add kernel density
Additional comment: Sometimes you can get the following error: unknown location(0): fatal error in "test_Inverse_Random_Sampler_2peaks": std::runtime_error: The Bisection algorithm requires that the values at the upper and lower bounds have a different sign, error during iteration. This mostly happens when you generate a large number of samples. I think that the reason is that the initial bounds of the root finder are too narrow, so the root lies outside the bounds. For example, for a Gaussian distribution this only happens in rare cases, because the probability is low that the sample has a value near the boundaries of the distribution. |
Feature/estimate update
A random sampler that uses an arbitrary CDF to generate the samples.
A uniform random sample is generated and the inverse CDF is used to generate the sample of the correct distribution.
The CDF is defined as a boost function and a root finder is used to obtain the inverse.
A unit test is included