Chapter 5 — Spatial and Spatiotemporal Intensity
I. Objectives and Scope
- Establish unified definitions, estimators, and tests for spatial/spatiotemporal intensity lambda(x) and lambda(x,t), fixing the minimal equation S92-7 and the Hawkes-type conditional intensity, and packaging an engineering workflow Mx-94.
- Cover homogeneous/inhomogeneous Poisson (HPP/IPP), Cox/cluster processes, and Hawkes self-exciting models; provide kernel intensity estimation, boundary correction, and paired second-order statistics (K_ripley(r), g(r)) with model diagnostics.
- Keep kernel notation K(u), bandwidths h, and the time-axis/window conventions (tau_mono, ts, U_w, ENBW_Hz) consistent with this volume and Core.Sea.
II. Counting Measure and Intensity (Minimal Equations)
- Represent a point pattern via a counting measure N(A): for any measurable set A ⊂ W, N(A) counts events in A.
- Intensity and cumulative intensity.
S92-7 : Lambda(A) = ( ∫_A lambda(x) dV ), which ensures E[ N(A) ] = Lambda(A).
The local intensity is lambda(x) = lim_{|A|→0} E[ N(A) ] / |A|. - Spatiotemporal extension.
lambda(x,t) = lim_{|A|,Δt→0} E[ N( A × (t,t+Δt] ) ] / ( |A| * Δt ), and Lambda(A×T) = ( ∫_T ∫_A lambda(x,t) dV dt ). - Units and dimensionality.
unit( lambda(x) ) = count / area; unit( lambda(x,t) ) = count / ( area * time ). Releases must pass check_dim(expr).
III. Intensity Model Families and Likelihoods
- Homogeneous Poisson (HPP).
Constant intensity lambda(x) = λ0; on window W, N(W) ~ Poisson( λ0 * |W| ). - Inhomogeneous Poisson (IPP).
Spatially varying lambda(x); often log lambda(x) = β^T φ(x).
Log-likelihood (up to constants):
S92-23 : log L( lambda ) = ( ∑_{i=1}^N log lambda( x_i ) ) - ( ∫_W lambda(x) dV ). - Cox (doubly stochastic) and cluster processes.
Intensity lambda(x) is itself a random field; standard choices include Neyman–Scott/Thomas clustering. - Gibbs / interaction processes.
Characterized via a potential or Papangelou conditional intensity; suitable for inhibition/repulsion. - Hawkes self-exciting (spatiotemporal).
S92-24 : lambda(x,t) = mu(x,t) + ( ∑_{t_i < t} H( x - x_i , t - t_i ) ).
Branching ratio:
S92-25 : eta = ( ∫_0^∞ ∫_{R^d} H(u,τ) dV du dτ ) < 1 (stability).
Separable kernel example:
S92-26 : H(u,τ) = κ * k_s( ||u|| ; σ ) * k_t( τ ; β ), hence eta = κ * ( ∫ k_s dV ) * ( ∫_0^∞ k_t dτ ).
IV. Kernel Intensity Estimation and Boundary Correction
- Spatial kernel intensity (d dimensions, bandwidth matrix H).
S92-18 : lambda_hat(x) = ( 1 / c_edge(x) ) * ( 1 / |H|^(1/2) ) * ∑_{i=1}^N K_d( H^(-1/2) * ( x - x_i ) ).
S92-19 : c_edge(x) = ( 1 / |H|^(1/2) ) * ( ∫_W K_d( H^(-1/2) * ( x - u ) ) dV_u ) (edge normalization).
Use K_d(u) = ∏_{j=1}^d K(u_j) (product) or a spherically symmetric kernel; K(•) and H align with Chapter 4. - Spatiotemporal kernel intensity (spatial H_s, temporal h_t).
S92-27 : lambda_hat(x,t) = ( 1 / c_edge(x) ) * ( 1 / ( |H_s|^(1/2) * h_t ) ) * ∑ K_d( H_s^(-1/2) * ( x - x_i ) ) * K_t( ( t - t_i ) / h_t ). - Common boundary corrections.
Translation: compute c_edge(x) via convolution with the window indicator (as above).
Isotropic (Ripley): weight by the visible arc fraction.
Border: drop points within distance r0 of the boundary (report the removed area/time fraction). - Sparse masks and occlusions.
If only a subdomain W_obs ⊂ W is observable, incorporate 1_{W_obs} into c_edge(x) and publish the mask separately.
V. Second-Order Statistics: K_ripley(r) and g(r)
- Homogeneous baseline (2D).
S92-20 : K_ripley(r) = ( 1 / λ0 ) * E[ (# of further points within distance r of a typical point) ].
S92-21 : g(r) = ( 1 / ( 2 * pi * r ) ) * ( d K_ripley(r) / d r ). - Inhomogeneous correction.
S92-22 : K_inhom(r) = E[ ∑_{i ≠ j} 1( ||x_i - x_j|| ≤ r ) / ( lambda(x_i) * lambda(x_j) ) ] / |W|. - Estimation notes.
Substitute lambda_hat(x) into K_inhom; apply isotropic/translation edge weights.
Interpretation: g(r) > 1 clustering; g(r) < 1 inhibition; g(r) ≈ 1 ≈ Poisson.
VI. Spatiotemporal Modeling and Alignment
- Separable intensity.
lambda(x,t) = s(x) * h(t), estimated via spatial and temporal kernels respectively; report separability checks (cross-correlation / likelihood-ratio). - Arrival-time alignment.
For cross-device events, order by tau_mono internally and retain ts for publication; when a path-based time is used, publish both T_arr formulations and delta_form. - Synchronization and jitter.
If offset/skew/J are material, reference Core.Sea Chapter 3 and write u(alpha_i), u(beta_i) into the manifest.
VII. Model Checking and Residual Diagnostics
- Quadrat tests (Poisson/IPP).
Partition W into {Q_k} and test whether N(Q_k) matches Poisson( ∫_{Q_k} lambda_hat dV ). - Second-order tests.
Compare K_ripley/K_inhom with theoretical baselines using simulation envelopes or permutations. - Conditional-intensity residuals (Hawkes).
Time rescaling: u_i = ( ∫_{t_{i-1}}^{t_i} ∫_W lambda_hat(x,t) dV dt ); if the model is correct, {1 - exp(-u_i)} is approximately Uniform(0,1). - Thinning and superposition.
For an IPP, thin with p(x) = min( 1 , c / lambda_hat(x) ) and test whether the residual pattern approaches HPP. - Uncertainty/envelopes.
Produce envelopes for K/g/Quadrat via bootstrap or parametric simulation; report the replication count and random seed.
VIII. Engineering Workflow Mx-94 (Event Stream → Intensity Map)
- Input and alignment. Load {x_i, t_i, meta}; align on tau_mono (retain ts); if path timing is used, provide both T_arr forms and record delta_form.
- Window and grid. Define spatial window W and optional time window T; build the evaluation grid and mask.
- Bandwidths and kernels. Choose K_d, K_t, and H_s, h_t (use Chapter 4 Mx-93 rule/CV if desired); record CV/LCV scores.
- Boundary correction. Compute c_edge(x) (translation/iso/border) and publish the method/parameters.
- Estimation and normalization. Compute lambda_hat(x) or lambda_hat(x,t); validate units and the consistency Z = ( ∫_W lambda_hat dV ) versus N(W).
- Second-order statistics. Evaluate K_ripley/K_inhom, g(r) and produce diagnostics/envelopes.
- Model fitting (optional). For Hawkes, specify H(u,τ) family, estimate mu, κ, σ, β, compute eta and residual diagnostics.
- Publication and manifest. Write intensity.tiff|parquet (or vector form) and emit manifest with uncertainty fields.
IX. Interface Contract and Return Shapes (Aligned with I90 3)
- intensity_estimate(points:any, kernel:str, h:float, domain:any) -> IntensRef
Inputs: points = {(x_i,t_i?)}, kernel = {"gaussian","epanechnikov",...}, h or H_s & h_t, domain = {W,(T)}.
Returns: {"lambda":"grid|tensor", "H_s":..., "h_t":..., "c_edge":"method+params", "support":"mask", "units":"count/area(/time)", "qc":{"Z":..., "N_obs":...}}. - hawkes_fit(events:any, kernel:str="exp", opts:dict|None=None) -> HawkesRef
Returns: {"mu":..., "kappa":..., "sigma":..., "beta":..., "eta":..., "diagnostics":{"rescale_pvals":..., "AIC":..., "BIC":...}}.
X. Data Manifest and Quality Thresholds (Minimum Set)
- intensity = {"type":"spatial|spatiotemporal", "kernel":{"space":"gaussian|...","time":"exp|box|..."},"bandwidth":{"H_s":...,"h_t":...}, "edge":{"method":"translation|iso|border","params":...}, "grid":{"shape":...,"spacing":...,"crs":...}, "units":"count/area(/time)"}
- qc = {"Z_vs_N":{"Z":∫ lambda_hat dV,"N_obs":N(W),"rel_err":...}, "K_test":{"method":"inhom","envelope_p":...}, "residuals":{"transform":"time-rescaling","KS_p":...}, "sync":{"tau_mono":...,"ts_ref":"UTC","delta_form":...}}
XI. Cross-Volume and Cross-Chapter Consistency
- Share kernel notation and H_s/h_t selection and CV/LCV strategy with Chapter 4; synchronize time base with Core.Sea Chapter 3 and the T_arr dual-form convention in Core.Sea Chapter 8.
- Statistical terms and uncertainty follow Chapters 3/10 of this volume: I_F, CRLB, u(x), U = k * u_c.
- Units and coordinates adhere to Core.Metrology; data pipeline and ingest follow Core.Sea Chapter 7.
XII. Chapter Highlights
- Centered on counting measures and intensity, we fixed S92-7, and the log-likelihood for IPP S92-23, the Hawkes conditional intensity S92-24 with stability S92-25–S92-26; we unified spatial and spatiotemporal kernel intensity estimators with boundary correction and second-order statistics.
- Delivered the Mx-94 engineering flow and the I90 3 interface/manifest schema, ensuring that the path from event streams to intensity maps is traceable, auditable, and consistent across volumes.