Skip to content
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

Access to additional variance components of GMM standard deviation models #9783

Open
mmoschetti-usgs opened this issue Jun 14, 2024 · 6 comments
Assignees
Milestone

Comments

@mmoschetti-usgs
Copy link

I don't think there is a straightforward way to access additional variance components (specifically, phiSS and phiS2S) from the GMM standard deviation models that compute these values. Are the OQ developers considering ways to evaluate and return these values in the GMM calculations?

@micheles
Copy link
Contributor

micheles commented Jul 1, 2024

Not at the moment. Saving such quantities would be hard and would require a lot of data storage, possibly slowing down continental scale calculations. If you are interested only in single site calculations, then there are no performance constraints; but then, you can just implement what you want at the level of hazardlib, without using the engine proper.
Maybe you can share some light on the use case you have in mind?

@micheles micheles added this to the Engine 3.21.0 milestone Jul 1, 2024
@emthompson-usgs
Copy link

I could be wrong, but I don't think that @mmoschetti-usgs is asking for anything that would require additional storage. For example, the Parker et al model already has the variance components in COEFFS attribute:
https://github.com/gem/oq-engine/blob/master/openquake/hazardlib/gsim/parker_2020.py#L386
So I think it is just a matter of providing a method to access that and potentially interpolate to an arbitrary period like what is done for computing the mean and the "traditional" three standard deviations.

@mmpagani
Copy link
Member

mmpagani commented Aug 7, 2024

Hi @emthompson-usgs and @mmoschetti-usgs. Sorry, I am seeing this thread only now. Is this something like this of any help?

from openquake.hazardlib.gsim.parker_2020 import ParkerEtAl2020SInter
from openquake.hazardlib.imt import PGA, SA
gmm = ParkerEtAl2020SInter()

coeffs = gmm.COEFFS[PGA()]
print(coeffs['phi2S2S,0'])

coeffs = gmm.COEFFS[SA(0.045)]
print(coeffs['phi2S2S,0'])

Unfortunately, we do not have standard methods to extract these parameters as the variability across various models is still too large. Note that in the example, the value for SA(0.045) is already the result of interpolation as this period is not available in the original table of Parker et al.

@emthompson-usgs
Copy link

@mmpagani Thanks, I didn't realize that COEFFS does interpolation. It would be nice to have a standard interface to these other uncertainty parameters eventually, but it makes sense that how they are reported by the different models is still too variable.

@mmpagani
Copy link
Member

mmpagani commented Aug 7, 2024

@emthompson-usgs Thanks. Let's think about this, it would be nice indeed to find a way to standardise this part. One initial simple but challenging thing would be standardising all the labels used to define the various explanatory variables and outputs.

@mmoschetti-usgs
Copy link
Author

mmoschetti-usgs commented Aug 7, 2024 via email

@micheles micheles modified the milestones: Engine 3.21.0, Engine 3.22.0 Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants