-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
ENH: adds Function.remove_outliers
method
#554
Conversation
c9ad317
to
3f3e499
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #554 +/- ##
===========================================
+ Coverage 72.60% 72.62% +0.02%
===========================================
Files 59 59
Lines 9584 9598 +14
===========================================
+ Hits 6958 6971 +13
- Misses 2626 2627 +1 ☔ View full report in Codecov by Sentry. |
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.
Interesting feature, useful for removing spurious points in data.
However, the way this method parameters were set (kwargs
that change based on another parameter) seems to overcomplicate its usage in order to prevent breaking changes. For instance, I see the following disadvantages:
-
I see that you explained everything in the documentation, but it has the potential of getting quite convoluted if we add more types with different
**kwargs
names. -
Code completition in most IDEs will not be available, since the parameters do not have a fixed name.
-
It is quite hard use the method without reading its documentation.
-
We can add, if needed, the
kwargs
behavior later without a breaking change, but we cannot remove or change it.
Do you have any references for this, or any particular reasoning I might have missed? I recall solve_ivp doing something similar, but in their case the method overall has a common set of parameters and the optional ones are generally secondary.
Personally, I would either standardize the parameter names among the different types or make them standalone methods.
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.
** made a comment in another review because of a weird GitHub issue with pending comments.
I understand your points. Just to check on this first:
|
3f3e499
to
8c278f4
Compare
Great questions:
|
OK! |
8c278f4
to
ccf0c6b
Compare
All comments addressed, @phmbressan could you review this one again? |
5987bd8
to
fda6b33
Compare
Thanks for the solid review, @phmbressan . |
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest tests -m slow --runslow
) have passed locallyCHANGELOG.md
has been updated (if relevant)Current behavior
Different datasets present undesired values that we usually have to remove manually.
New behavior
The Function class now can remove outliers from the source (if array like) using the IQR method.
Breaking change
Additional information