Comments (2)
To compute the mean loss map we need the mean loss for each asset. To compute the mean loss, given a ground motion fields set (related to the location where the asset is defined) and the asset (that has a location and a vulnerability function), we have to:
- compute the loss ratios using the probabilistic event based approach
- compute the losses, by multiplying each loss ratio for the asset value
- compute the mean with numpy.mean()
The story https://www.pivotaltracker.com/story/show/5163233 just takes into account these steps. The integration with the inputs provided by the hazard subsystem will be done in this story https://www.pivotaltracker.com/story/show/10958017
To compute the stddev loss maps we need to use numpy.std in the last step instead of numpy.mean(). The integration with the inputs provided by the hazard subsystem will be done in this story https://www.pivotaltracker.com/story/show/10958017
The proposed change is to add an openquake.risk.deterministic_event_based module with two public functions:
- compute_mean_loss(vuln_function, ground_motion_field_set, epsilon_provider, asset)
- compute_stddev_loss(vuln_function, ground_motion_field_set, epsilon_provider, asset)
Update:
Since an asset is defined on a site (as well as the ground motion field set), and it has a vulnerability function associated, we could think of have something like:
- compute_mean_loss(asset, epsilon_provider)
- compute_stddev_loss(asset, epsilon_provider)
And then inside the functions:
vuln_function = asset.vuln_function
ground_motion_field_set = asset.site.ground_motion_fields
But this implies creating an object model that we don't have right now (we use just plain dictionaries). Comments on this?
from oq-engine.
Computing the mean/stddev loss per ground motion field is more difficult. Per ground motion field means that we collect the same ground motion field for all the sites defined in the region. Right now we have the opposite, we have sets of ground motion field per site. So, we could think of:
- Keep the slicing this way, collect the sets for all the sites and do the computation (using probably a numpy matrix). This requires lots of memory if we use big regions, but it is quite easy to implement.
- Add the slicing per ground motion field, and use the same logic we use to compute the mean/stddev loss per site with the slicing we have right now.
Since I don't know yet how much it costs (and if it's possible) to slice per ground motion field, I'm going to implement the hazard side and then come back to this story.
from oq-engine.
Related Issues (20)
- openquake Hazard run job.ini crash Memory Error!!! HOT 7
- Improve error handling
- use of region_grid_spacing in a conditioned gmf produces a key error now HOT 2
- Access to additional variance components of GMM standard deviation models HOT 6
- Imported CSV ruptures cannot exported
- Incorrect documentation for Afshari Stewart 2016 HOT 1
- Extend read_geometries to the case of a non-unique field
- Mention `create_jobs` and `run_jobs` in the documentation
- ARISTOTLE: disable the `Run a Calculation` button
- multifault msparams issues HOT 2
- acme_2019.py throws np.RankWarning error HOT 1
- ARISTOTLE: test the workflow using the finite-fault data HOT 1
- Add a warning to the WebUI login page about the possibility to be banned
- ARISTOTLE: get rupture geometries from rupture.json if available HOT 1
- Incorrect imports listed at top of GSIM module
- Adjustments for US NSHM GMPEs HOT 6
- New CAV models HOT 4
- Kotha 2020 files missing from pip install HOT 1
- Southeast Africa GMM
- Adding regionalisation of NGAWest2 basin param relationships in site.py HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oq-engine.