openquake.hme.model_test_frameworks.relm.relm_test_functionsΒΆ

Utility functions for running tests in the RELM model test framework.

Module Attributes

S_TEST_FN

def subdivide_observed_eqs_old(bin_gdf: GeoDataFrame, subcat_n_years: int):

Functions

N_test_empirical(num_obs_events, ...)

N-test using empirical (cumulative Poisson) distribution from sampled MFD counts.

N_test_neg_binom(num_obs_events, ...)

N-test using a negative binomial distribution (for temporally overdispersed earthquake production).

N_test_poisson(num_obs_events, rupture_rate, ...)

N-test using a Poisson distribution.

conf_interval_poisson(rate_mfd[, ...])

Evaluates whether the observed total event count falls within a Poisson confidence interval of the modeled rate.

get_poisson_counts_from_mfd(mfd)

Samples random Poisson counts from each magnitude bin rate.

l_test_function(rup_gdf, eq_gdf, ...[, ...])

Joint likelihood test (L-test).

m_test_function(rup_gdf, eq_gdf, mag_bins, ...)

Magnitude consistency test (M-test).

mfd_log_likelihood(rate_mfd[, ...])

Calculates the log-likelihood of the observations (either binned_events or empirical_mfd) given the modeled rates (rate_mfd).

n_test_function(rup_gdf, eq_gdf, test_config)

N-test: compares the total observed earthquake count to the model prediction.

s_test_cell(rup_gdf, eq_gdf, test_cfg)

Computes the S-test likelihood for a single spatial cell by comparing the observed MFD log-likelihood to stochastic MFD log-likelihoods.

s_test_cells(cell_groups, rup_gdf, ...[, ...])

Runs the S-test likelihood computation for each spatial cell, optionally in parallel.

s_test_function(rup_gdf, eq_gdf, ...[, ...])

Spatial consistency test (S-test).

total_event_likelihood(rate_mfd[, ...])

Calculates the log-likelihood of the observations (either binned_events or empirical_mfd) given the modeled rates (rate_mfd).