API Reference

This reference is generated from the docstrings in the source code via sphinx.ext.autosummary / sphinx.ext.autodoc. Each entry below links to a page with the full signature, parameter descriptions, and (for classes) a summary of public methods and attributes. Private helpers (names prefixed with _) are intentionally not part of this reference.

Main package

Importing geossm re-exports the main classes and functions from its submodules (geossm.covmodel, geossm.datasets, geossm.ssm, geossm.stmodel, plus geossm.data_preparation and geossm.utils) at the top level, e.g. geossm.LRStateSpaceModel is the same object as geossm.stmodel.LRStateSpaceModel. The sections below document each name once, grouped by the submodule it is defined in; geossm.__version__ holds the installed package version.

Models

State-space model

The full-rank linear-Gaussian state-space model: Kalman filtering, smoothing, simulation, and prediction.

StateSpaceModel

A linear-Gaussian state-space model with Kalman filtering, smoothing and simulation capabilities.

StateSpaceResults

Container for state-space model estimation results (filter and/or smoother outputs), with convenience methods for residuals, error metrics, confidence intervals, diagnostics and a printable summary.

Low-rank state-space model

geossm’s flagship model for large spatial domains: a state-space model whose latent spatial field is represented through a low-rank, SPDE-based covariance basis (see Covariance below).

LRStateSpaceModel

Low-Rank State-Space Model (LRSSM) for large-scale spatio-temporal data.

LRStateSpaceResults

Results of fitting a geossm.stmodel.LRStateSpaceModel.

Param

A single named model parameter, with its value, fixed/free status, and (once available) standard error.

ModelParams

The full set of parameters estimated by fit().

FitOptions

Stopping-rule and logging options for fit().

Covariance

Finite-element (SPDE) approximation of the Matérn covariance, and the mesh builders used to discretize the spatial domain it is defined on.

spdeAppoxCov

The SPDE approximation of the Matérn covariance model.

FEMSolver

Low-level finite-element engine behind spdeAppoxCov.

buildMesh2d

Build a 2D triangular (gmsh/pygmsh) mesh around a set of observed locations, in the spirit of R-INLA's inla.mesh.2d().

buildMesh2d_density

Build a 2D triangular mesh whose interior vertices are a density- matched subset of points, rather than free vertices placed by a smooth size field (as buildMesh2d does).

buildMesh2d_new

Simplified front door to buildMesh2d_density's density-matched mesh: picks a landmark-placement method instead of juggling snap_to_points/relax_iters directly, and leaves every other knob (min_edge, offset, cutoff, tol, max_iter) at buildMesh2d_density's own defaults, which are self-tuning (derived from lowrank, the interest domain, and max_edge) and rarely need hand-adjustment.

buildMeshGrid2d

Build a regular (structured) 2D triangular mesh: a lattice of nx by ny vertices spanning the bounding box of domain (or the convex hull of points if domain is not given), extended by offset.

Spatial data preparation

Turning a geopandas.GeoDataFrame plus a model formula into the design matrices consumed by the models above, and the datasets bundled with the package.

DesignMatrices

Container for the response and covariate design matrices of a spatio-temporal dataset, organized on an [N x T] (site x time) grid, together with the spatial/temporal/formula metadata needed to interpret and reproduce them.

DesignMatricesBuilder

Turn a spatio-temporal geopandas.GeoDataFrame plus a Patsy/R-style model formula into a DesignMatrices object (response + covariates organized on an [N x T] site x time grid), ready to be consumed by geossm's state-space models.

check_regular_timestamps

Check whether a collection of timestamps is regularly spaced.

load_dataset

Load one of the example datasets bundled with geossm.

list_datasets

List available example datasets bundled with the package.

Utilities

General-purpose helpers shared across the package.

block_diag_3D

Stack 3D arrays into a single 3D block-diagonal array.

write

Append a run log (observation grid, model, and hardware info) to a text file.

getHardware

Build a human-readable summary of the current machine's hardware.

KeyStream

Stateful helper that hands out fresh JAX PRNG keys on demand.