-
-
Notifications
You must be signed in to change notification settings - Fork 208
ENH: allow users to provide custom samplers #803
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
Conversation
|
@Gui-FernandesBR, @MateusStano and @phmbressan, I would like, if possible, a design check in this feature. I am not sure if this is what you had in mind. In order to allow the user to specify his own sampler, I thought of providing an abstract class I provided a notebook to test the feature design. There, I implemented a MixtureOfGaussian distribution which is not natively implemented in numpy. (Think of a bimodal gaussian distribution if you want, as exemplified below. |
Gui-FernandesBR
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plrase update the changelog
209bd3f to
dcdb961
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #803 +/- ##
===========================================
+ Coverage 79.11% 79.84% +0.72%
===========================================
Files 96 98 +2
Lines 11575 11958 +383
===========================================
+ Hits 9158 9548 +390
+ Misses 2417 2410 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Just missing changelog, then we can merge |

Pull request type
Checklist
black rocketpy/ tests/) has passed locallypytest tests -m slow --runslow) have passed locallyCHANGELOG.mdhas been updated (if relevant)Current behavior
Currently, the user must use distributions that are specified in numpy.
New behavior
Allows the user to build upon the abstract class
CustomSamplerwhich must contain two methods:sampleandreset_seed. Note that the user may implement very complex samplers that use real data, so long as it conforms to returning the data in the format specified.Breaking change
Additional information