Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spline-ETAS-Model

Modeling non-stationary ETAS models using spline functions, with weight coefficients as function inputs

Test Results

# Process[1/25]: w(mu)=0.001   w(K)=0.001 

# Process[2/25]: w(mu)=0.001   w(K)=0.0177828 

# Process[3/25]: w(mu)=0.001   w(K)=0.316228 

# Process[4/25]: w(mu)=0.001   w(K)=5.62341 
...


# ==== FIT FINISHED ====   2026-07-29 13:12:36
# Best w_mu      = 0.001
# Best w_K       = 0.001
# Best ABIC = -4384.7914
# Best AIC  = -4350.9417
# fs             = 30.09
# ========================

Parameters Configuration

=========================================================================
Output structure: Result
=========================================================================

Result.time:
  Sorted event occurrence times used in the fitting.
  Unit should be days if the input time is already converted to days.

Result.mag:
  Event magnitudes corresponding to Result.time.

Result.Mmin:
  Reference magnitude used in the ETAS productivity term:
      exp(alpha_ref * (mag - Mmin)).

Result.Params_ref:
  Fixed reference stationary ETAS parameter vector:
      [mu_ref, K0_ref, c_ref, alpha_ref, p_ref].
  In this fixed-parameter version, these parameters are not optimized.

Result.mu_ref:
  Reference background seismicity rate.
  Unit: events/day.

Result.K0_ref:
  Reference productivity coefficient of the triggering term.

Result.c_ref:
  Reference Omori-Utsu time offset.
  Unit: days.

Result.alpha_ref:
  Reference magnitude productivity scaling parameter.

Result.p_ref:
  Reference Omori-Utsu temporal decay exponent.

Result.N_knots:
  Number of spline knots used for each anomaly function.
  The total number of optimized spline parameters is:
      2 * Result.N_knots.

Result.knots:
  Knot locations of the natural cubic splines.
  The same knots are used for s_mu(t) and s_K(t).

Result.W_mu_grid:
  Candidate smoothing weights tested for the background anomaly q_mu(t).

Result.W_K_grid:
  Candidate smoothing weights tested for the productivity anomaly q_K(t).

Result.ABIC_table:
  Grid-search result table for smoothing weight selection.
  Columns are:
      [w_mu, w_K, ABIC_like, obj_min, logL, success]

  Column 1, w_mu:
      Smoothing weight for s_mu(t).

  Column 2, w_K:
      Smoothing weight for s_K(t).

  Column 3, ABIC_like:
      Simplified ABIC-like criterion:
          ABIC_like = 2 * obj_min + 2 * n_hyper
      where n_hyper = 2.

  Column 4, obj_min:
      Minimum penalized negative log-likelihood:
          obj_min = -logL + w_mu * R_mu + w_K * R_K.

  Column 5, logL:
      Unpenalized log-likelihood evaluated at the optimum.

  Column 6, success:
      Optimization success flag.
      1 means exitflag > 0; 0 means not successful.

Result.best_w_mu:
  Selected smoothing weight for q_mu(t), chosen by minimum ABIC_like.

Result.best_w_K:
  Selected smoothing weight for q_K(t), chosen by minimum ABIC_like.

Result.best_ABIC_like:
  Minimum ABIC_like value over all smoothing-weight pairs.

Result.best_obj:
  Minimum penalized objective value for the selected smoothing weights:
      best_obj = -best_logL + best_w_mu * R_mu + best_w_K * R_K.

Result.best_logL:
  Unpenalized log-likelihood at the optimal spline parameters.

Result.params_opt:
  Optimized spline coefficient vector:
      [s_mu_knots;
       s_K_knots]
  These are not [mu, K0, c, alpha, p].
  They are the log-anomaly spline coefficients.

Result.s_mu_knots:
  Optimized values of s_mu(t) at the spline knots.
  The background anomaly is:
      q_mu(t) = exp(s_mu(t)).

Result.s_K_knots:
  Optimized values of s_K(t) at the spline knots.
  The productivity anomaly is:
      q_K(t) = exp(s_K(t)).

Result.q_mu_knots:
  Background anomaly factors at knots:
      q_mu_knots = exp(s_mu_knots).

Result.q_K_knots:
  Productivity anomaly factors at knots:
      q_K_knots = exp(s_K_knots).

Result.R_mu:
  Roughness penalty component for s_mu(t):
      R_mu = integral [s_mu''(t)]^2 dt.

Result.R_K:
  Roughness penalty component for s_K(t):
      R_K = integral [s_K''(t)]^2 dt.

Result.penalty:
  Weighted total roughness penalty:
      penalty = best_w_mu * R_mu + best_w_K * R_K.

Result.event:
  Structure containing fitted quantities evaluated at event times.
  See the "Result.event structure" section below.

Result.grid:
  Structure containing fitted quantities evaluated on a regular time grid.
  This is mainly used for plotting smooth curves.
  See the "Result.grid structure" section below.

Result.TransN:
  Transformed event times from the time-rescaling theorem:
      tau_i = integral from T0 to t_i of lambda(u | H_u) du.

  If the model fits well, the transformed process should be close to a
  unit-rate Poisson process.

Result.NumEvents:
  Cumulative event count:
      [1; 2; ...; N].

Result.fai:
  Background probability for each event:
      fai_i = mu(t_i) / lambda(t_i).

  This is identical to:
      Result.event.fai.

Result.fs:
  Mean background probability:
      fs = mean(fai) = sum(fai) / N.

  It can be interpreted as the estimated background-event fraction;

=========================================================================
Result.event structure
=========================================================================

Result.event.lambda:
  Conditional intensity evaluated at each event time:

      lambda(t_i) = mu(t_i) + trig(t_i)

  where:

      mu(t_i) = mu_ref * q_mu(t_i)

  and:

      trig(t_i) = sum_{j:t_j<t_i}
                  K0_ref * q_K(t_j) * exp(alpha_ref*(m_j-M0))
                  * (t_i - t_j + c_ref)^(-p_ref).

  Unit: events/day.

Result.event.mu:
  Time-varying background rate evaluated at event times:

      mu(t_i) = mu_ref * q_mu(t_i).

  Unit: events/day.

Result.event.trig:
  Triggering contribution to the conditional intensity at each event time:

      trig(t_i) = lambda(t_i) - mu(t_i).

  Unit: events/day.

Result.event.q_mu:
  Background anomaly factor evaluated at event times:

      q_mu(t_i) = exp(s_mu(t_i)).

  If q_mu(t_i) > 1, the fitted background rate is higher than mu_ref.
  If q_mu(t_i) < 1, the fitted background rate is lower than mu_ref.

Result.event.q_K:
  Productivity anomaly factor evaluated at event times:

      q_K(t_i) = exp(s_K(t_i)).

  If q_K(t_i) > 1, event productivity is higher than K0_ref.
  If q_K(t_i) < 1, event productivity is lower than K0_ref.

Result.event.K0:
  Time-varying productivity coefficient evaluated at event times:

      K0(t_i) = K0_ref * q_K(t_i).

Result.event.productivity:
  Full productivity of each source event:

      productivity_i = K0_ref * q_K(t_i)
                       * exp(alpha_ref * (mag_i - M0)).

  This quantity controls how strongly event i triggers future events.

Result.event.fai:
  Background probability for each event:

      fai_i = mu(t_i) / lambda(t_i).

  This is the probability that event i belongs to the background component
  rather than being triggered by previous events.

Result.event.fs:
  Mean background probability:

      fs = mean(Result.event.fai).

  This is the estimated average background fraction.


=========================================================================
Result.grid structure
=========================================================================

Result.grid.time:
  Regular time grid from min(Result.time) to max(Result.time).
  Default length is 600.

Result.grid.lambda:
  Conditional intensity evaluated on Result.grid.time:

      lambda(t) = mu(t) + trig(t).

  Unit: events/day.

Result.grid.mu:
  Time-varying background rate evaluated on the grid:

      mu(t) = mu_ref * q_mu(t).

  Unit: events/day.

Result.grid.trig:
  Triggering contribution evaluated on the grid:

      trig(t) = sum_{j:t_j<t}
                K0_ref * q_K(t_j) * exp(alpha_ref*(m_j-M0))
                * (t - t_j + c_ref)^(-p_ref).

  Unit: events/day.

Result.grid.q_mu:
  Background anomaly factor evaluated on the grid:

      q_mu(t) = exp(s_mu(t)).

Result.grid.q_K:
  Productivity anomaly factor evaluated on the grid:

      q_K(t) = exp(s_K(t)).

Result.grid.K0:
  Time-varying productivity coefficient evaluated on the grid:

      K0(t) = K0_ref * q_K(t).

  Note:
      In the ETAS triggering sum, q_K is evaluated at source event times
      t_j, not at the target time t. Result.grid.K0 is mainly for plotting
      the smooth fitted productivity anomaly over time.


=========================================================================
Internal details structure from logLikelihoodFixedETAS
=========================================================================

details.lambda_i:
  Conditional intensity lambda(t_i) at event times.

details.mu_i:
  Background rate mu(t_i) at event times.

details.trig_i:
  Triggering contribution at event times.

details.q_mu_event:
  q_mu(t_i) at event times.

details.q_K_event:
  q_K(t_i) at event times.

details.productivity_j:
  Source productivity of each event j:

      productivity_j = K0_ref * q_K(t_j)
                       * exp(alpha_ref * (mag_j - M0)).

details.bg_part:
  Background integral in the log-likelihood:

      bg_part = integral from T0 to T of mu_ref*q_mu(t) dt.

details.trig_part:
  Triggering integral in the log-likelihood:

      trig_part = sum_j productivity_j
                  * integral from t_j to T of (t-t_j+c_ref)^(-p_ref) dt.

The full log-likelihood is:

      logL = sum_i log(lambda_i) - bg_part - trig_part.

Sum

About

Modeling non-stationary ETAS models using spline functions, with weight coefficients as function inputs

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages