Skip to content

Commit 6012a5c

Browse files
committed
build: Updated for v0.1.4
1 parent d4cf53f commit 6012a5c

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

floatcsep/extras.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,13 @@ def p_series(lambd, niters=500):
340340

341341

342342
def _nbd_number_test_ndarray(fore_cnt, obs_cnt, variance, epsilon=1e-6):
343-
"""
343+
"""
344344
Computes delta1 and delta2 values from the Negative Binomial (NBD) number test.
345345
346346
Args:
347347
fore_cnt (float): parameter of negative binomial distribution coming from expected value of the forecast
348348
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.
350350
A variance value of approximately 23541 has been calculated using M5.95+ earthquakes observed worldwide from 1982 to 2013.
351351
epsilon (float): tolerance level to satisfy the requirements of two-sided p-value
352352
@@ -371,7 +371,7 @@ def negative_binomial_number_test(gridded_forecast, observed_catalog,
371371
Computes "negative binomial N-Test" on a gridded forecast.
372372
373373
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
375375
probablities of
376376
(i) At least no. of events (delta 1)
377377
(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,
383383
observed_catalog: Observed (Gridded) seismicity (Numpy Array):
384384
An Observation has to be Number of Events in Each Bin
385385
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.
387387
388388
Returns:
389389
out (tuple): (delta_1, delta_2)
@@ -418,7 +418,7 @@ def negative_binomial_number_test(gridded_forecast, observed_catalog,
418418
def binomial_joint_log_likelihood_ndarray(forecast, catalog):
419419
"""
420420
Computes Bernoulli log-likelihood scores, assuming that earthquakes follow a binomial distribution.
421-
421+
422422
Args:
423423
forecast: Forecast of a Model (Gridded) (Numpy Array)
424424
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,
455455
num_simulations: default number of simulations to use for likelihood based simulations
456456
seed: used for reproducibility of the prng
457457
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
459459
distribution
460460
"""
461461

@@ -582,15 +582,15 @@ def binomial_conditional_likelihood_test(
582582

583583
def _binary_t_test_ndarray(target_event_rates1, target_event_rates2, n_obs,
584584
n_f1, n_f2, catalog, alpha=0.05):
585-
"""
585+
"""
586586
Computes binary T test statistic by comparing two target event rate distributions.
587587
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
592592
forecasting models in California. doi: 10.1093/gji/ggac018.
593-
593+
594594
Args:
595595
target_event_rates1 (numpy.ndarray): nd-array storing target event rates
596596
target_event_rates2 (numpy.ndarray): nd-array storing target event rates
@@ -666,8 +666,8 @@ def _standard_deviation(gridded_forecast1, gridded_forecast2,
666666
cell_area2):
667667
"""
668668
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.
671671
After we get forecast rates for non-zeros observations, then Pooled Variance is calculated.
672672
673673

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ long_description_content_type = text/markdown
66
author = Pablo Iturrieta
77
author_email = pciturri@gfz-potsdam.de
88
license = BSD 3-Clause License
9-
version = 0.1.3
9+
version = 0.1.4
1010
platforms = unix, linux, osx, win32
1111
classifiers =
1212
Programming Language :: Python :: 3

0 commit comments

Comments
 (0)