-
Notifications
You must be signed in to change notification settings - Fork 149
Implement quantiles and median for hazard and impact forecasts #1191
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
…saving impact matrix
…/CLIMADA-project/climada_python into impactCalc_return_impactForecast
…/CLIMADA-project/climada_python into impactCalc_return_impactForecast
85b92ef to
302be63
Compare
|
|
||
| def mean(self): | ||
| """ | ||
| Reduce the impact matrix and at_event of an ImpactForecast to the mean value. |
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.
If I understand correctly, you want to reduce only along the event axis (0). So this is not a single mean value. But a mean value per exposure point.
|
|
||
| def _reduce_attrs(self, event_name: str): | ||
| """ | ||
| Reduce the attributes of an ImpactForecast to a single value. |
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.
If I understand correctly, you want to reduce only along the event axis (0). So this is not a single mean value. But a reduced value per exposure point. The docstring could be clearer.
| Reduce the intensity and fraction of a HazardForecast to the minimum | ||
| value. |
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.
Here also the docstring are misleading imho.
| Reduce the intensity and fraction of a HazardForecast to the minimum | |
| value. | |
| Reduce the intensity and fraction of a HazardForecast to the minimum | |
| over all events value per centroid. |
| Returns | ||
| ------- | ||
| HazardForecast | ||
| A HazardForecast object with the min intensity and fraction. |
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.
| A HazardForecast object with the min intensity and fraction. | |
| A HazardForecast object with the min intensity and fraction per centroid. |
|
|
||
| def median(self): | ||
| """ | ||
| Reduce the impact matrix and at_event of a HazardForecast to the median value. |
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.
| Reduce the impact matrix and at_event of a HazardForecast to the median value. | |
| Reduce the impact matrix and at_event of a HazardForecast to the median value over all events. |
|
@chahank We'll have to rework all docstrings before merging into |
Changes proposed in this PR:
This PR fixes #1162
PR Author Checklist
develop)PR Reviewer Checklist