@@ -340,13 +340,13 @@ def p_series(lambd, niters=500):
340
340
341
341
342
342
def _nbd_number_test_ndarray (fore_cnt , obs_cnt , variance , epsilon = 1e-6 ):
343
- """
343
+ """
344
344
Computes delta1 and delta2 values from the Negative Binomial (NBD) number test.
345
345
346
346
Args:
347
347
fore_cnt (float): parameter of negative binomial distribution coming from expected value of the forecast
348
348
obs_cnt (float): count of earthquakes observed during the testing period.
349
- variance (float): variance parameter of negative binomial distribution coming from historical catalog.
349
+ variance (float): variance parameter of negative binomial distribution coming from historical catalog.
350
350
A variance value of approximately 23541 has been calculated using M5.95+ earthquakes observed worldwide from 1982 to 2013.
351
351
epsilon (float): tolerance level to satisfy the requirements of two-sided p-value
352
352
@@ -371,7 +371,7 @@ def negative_binomial_number_test(gridded_forecast, observed_catalog,
371
371
Computes "negative binomial N-Test" on a gridded forecast.
372
372
373
373
Computes Number (N) test for Observed and Forecasts. Both data sets are expected to be in terms of event counts.
374
- We find the Total number of events in Observed Catalog and Forecasted Catalogs. Which are then employed to compute the
374
+ We find the Total number of events in Observed Catalog and Forecasted Catalogs. Which are then employed to compute the
375
375
probablities of
376
376
(i) At least no. of events (delta 1)
377
377
(ii) At most no. of events (delta 2) assuming the negative binomial distribution.
@@ -383,7 +383,7 @@ def negative_binomial_number_test(gridded_forecast, observed_catalog,
383
383
observed_catalog: Observed (Gridded) seismicity (Numpy Array):
384
384
An Observation has to be Number of Events in Each Bin
385
385
It has to be a either zero or positive integer only (No Floating Point)
386
- variance: Variance parameter of negative binomial distribution obtained from historical catalog.
386
+ variance: Variance parameter of negative binomial distribution obtained from historical catalog.
387
387
388
388
Returns:
389
389
out (tuple): (delta_1, delta_2)
@@ -418,7 +418,7 @@ def negative_binomial_number_test(gridded_forecast, observed_catalog,
418
418
def binomial_joint_log_likelihood_ndarray (forecast , catalog ):
419
419
"""
420
420
Computes Bernoulli log-likelihood scores, assuming that earthquakes follow a binomial distribution.
421
-
421
+
422
422
Args:
423
423
forecast: Forecast of a Model (Gridded) (Numpy Array)
424
424
A forecast has to be in terms of Average Number of Events in Each Bin
@@ -455,7 +455,7 @@ def _binomial_likelihood_test(forecast_data, observed_data,
455
455
num_simulations: default number of simulations to use for likelihood based simulations
456
456
seed: used for reproducibility of the prng
457
457
random_numbers (numpy.ndarray): can supply an explicit list of random numbers, primarily used for software testing
458
- use_observed_counts (bool): if true, will simulate catalogs using the observed events, if false will draw from poisson
458
+ use_observed_counts (bool): if true, will simulate catalogs using the observed events, if false will draw from poisson
459
459
distribution
460
460
"""
461
461
@@ -582,15 +582,15 @@ def binomial_conditional_likelihood_test(
582
582
583
583
def _binary_t_test_ndarray (target_event_rates1 , target_event_rates2 , n_obs ,
584
584
n_f1 , n_f2 , catalog , alpha = 0.05 ):
585
- """
585
+ """
586
586
Computes binary T test statistic by comparing two target event rate distributions.
587
587
588
- We compare Forecast from Model 1 and with Forecast of Model 2. Information Gain per Active Bin (IGPA) is computed, which is then
589
- employed to compute T statistic. Confidence interval of Information Gain can be computed using T_critical. For a complete
590
- explanation see Rhoades, D. A., et al., (2011). Efficient testing of earthquake forecasting models. Acta Geophysica, 59(4),
591
- 728-747. doi:10.2478/s11600-011-0013-5, and Bayona J.A. et al., (2022). Prospective evaluation of multiplicative hybrid earthquake
588
+ We compare Forecast from Model 1 and with Forecast of Model 2. Information Gain per Active Bin (IGPA) is computed, which is then
589
+ employed to compute T statistic. Confidence interval of Information Gain can be computed using T_critical. For a complete
590
+ explanation see Rhoades, D. A., et al., (2011). Efficient testing of earthquake forecasting models. Acta Geophysica, 59(4),
591
+ 728-747. doi:10.2478/s11600-011-0013-5, and Bayona J.A. et al., (2022). Prospective evaluation of multiplicative hybrid earthquake
592
592
forecasting models in California. doi: 10.1093/gji/ggac018.
593
-
593
+
594
594
Args:
595
595
target_event_rates1 (numpy.ndarray): nd-array storing target event rates
596
596
target_event_rates2 (numpy.ndarray): nd-array storing target event rates
@@ -666,8 +666,8 @@ def _standard_deviation(gridded_forecast1, gridded_forecast2,
666
666
cell_area2 ):
667
667
"""
668
668
Calculate Variance using forecast 1 and forecast 2.
669
- But It is calculated using the forecast values corresponding to the non-zero observations.
670
- The same process is repeated as repeated during calculation of Point Process LL.
669
+ But It is calculated using the forecast values corresponding to the non-zero observations.
670
+ The same process is repeated as repeated during calculation of Point Process LL.
671
671
After we get forecast rates for non-zeros observations, then Pooled Variance is calculated.
672
672
673
673
0 commit comments