-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 Features: absolute_maximum; mean_n_absolut_max | Add install_requirements.sh script #833
Conversation
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.
good first draft, btw. what are those lock files in the dask-worker space for?
Co-authored-by: Maximilian Christ <max.christ@me.com>
I noticed that you dont test for the AssertionError in I added |
@MaxBenChrist Could you please refer to T3 from my PR? What about |
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.
Also thanks from my side. I had a few comments in the code.
Some general points:
- as mentioned by Max, please remove the dask-worker-space files from your PR.
- one of your new features (the
mean_n_absolute_max
) requires a parameter. This means you need to add it to the feature calculator settings with a reasonable default. Especially, you need to add an entry in theComprehensiveFCParameters
dict (have a look into the other features which are already there). I would assume reasonable values would be small numbers, probably below 10.
To your questions:
- Q1: testing for
< 0
in your code is fine. Users can change the parameters, so testing in the unittests is not enough. - no, there is no reason we do not test the assertion error. That could be added, good point.
- to T3: To fix the two remaining tests, you need to add your new feature to the settings (see above) - as mentioned in the exception of the tests.
Co-authored-by: Nils Braun <nils-braun@users.noreply.github.com>
Co-authored-by: Nils Braun <nils-braun@users.noreply.github.com>
Check. All done. For testing the install_requirements.sh file, I created another issue. Because I am not sure yet how to implement it. |
I will have a look this evening, but I think I am still seeing the dask worker files :-) |
Thanks! |
Added:
F1. I added a
install_requirements.sh
script for convenienceF2. I added a
absolut_maximum
feature. This feature calculates the absolut maximum.F3. I added a
mean_n_absolut_max
feature. This calculates the arithmetic mean of the n absolut maximum values of the time series.Tests:
T1: I added unit-tests for mean_n_absolut_max.
T2: I did not ad unit-tests for absolut_maximum, because there is also no unit-test for maximum.
T3: Some tests fail. Most are not on my watch, I think. However, I think the following are on me but I dont know how to resolve them:
test_contains_all_non_high_comp_features
andtest_default_calculates_all_features
. In particular, I dont know how I can add my newly created features here.Questions:
Q1: The feature mean_n_absolut_max takes an additional input parameter (the number of maximums to consider). Where and how should I check, that this input parameter is valid, e.g. not smaller 0 and so on. Should it be checked in the pytest unittests? Or should I raise an error within the feature calculator function itself? For now, I just return np.nan if the input parameter is not valid.
Others