-
Notifications
You must be signed in to change notification settings - Fork 9
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
New Peak Ratio #435
New Peak Ratio #435
Conversation
What a pro. I'm amazed. As for the parameters, I guess we can just reference MIke EVA manual https://manuals.mikepoweredbydhi.help//2024/General/EVA_UserGuide.pdf |
@ecomodeller don't forget about the peasants |
all comments addressed |
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.
Peak ratio is a very specific metric and I will assume that users of this metric are aware of the details.
df_filter["Maximum"] = df_filter.max(axis=1) | ||
df_filter.sort_values(by="Maximum", ascending=False, inplace=True) | ||
# Finally we do the selection of the N- largest peaks from either model or measured | ||
df_filter = df_filter.iloc[0:top_n_peaks, :] |
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.
top_n_peaks
has to be integer for this to work. This is not always the case.
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.
@daniel-caichac-DHI did you take a look at this?
@@ -543,20 +544,20 @@ def peak_ratio( | |||
obs: pd.Series, | |||
model: np.ndarray, | |||
inter_event_level: float = 0.7, | |||
AAP: int = 2, | |||
inter_event_time="36h", | |||
AAP: Union[int, float] = 2, |
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.
Does it make sense to use integer?
AAP: Union[int, float] = 2, | |
AAP: float = 2.0, |
Hi.
After a long discussion we decided to update the peak selection in the Peak Ratio.
Small change but has some implications in the results. Also the number of times the user gets a NaN (no joint events) is much lower now (still can happen with very short time series with no evident peaks).
I had to obviously update the tests results of PR as the expected values now change.
Aligns with what was done here:
https://github.com/DHI/potpy/pull/39