Bayesian Inference for Geospatial Data

VerifiedSafe

Performs Bayesian inference and probabilistic modeling for geospatial data. Use it to build hierarchical models, compute posteriors via MCMC or variational methods (PyMC/TFP), compare models (LOO/WAIC/DIC), or implement spatial Gaussian processes with Cholesky decomposition.

Sby Skills Guide Bot
Data & AIAdvanced
906/2/2026
Claude Code
#bayesian-inference#geospatial#probabilistic-modeling#gaussian-processes#hierarchical-models

Recommended for

Our review

Performs Bayesian inference and probabilistic modeling for geospatial data, including MCMC, Gaussian processes, and hierarchical models.

Strengths

  • Implements full MCMC and variational inference methods
  • Supports model comparison via LOO, WAIC, DIC
  • Uses Cholesky decomposition for Gaussian processes
  • Integrates with PyMC and TensorFlow Probability

Limitations

  • Requires advanced probabilistic knowledge
  • May be computationally intensive for large datasets
  • Gaussian processes limited to moderate dimensions
When to use it

Best for estimating uncertainty and parameters in complex spatial models with georeferenced data.

When not to use it

Avoid for simple analyses or non-spatial data, or when computation time is severely constrained.

Security analysis

Safe
Quality score88/100

The skill describes a Bayesian inference library for geospatial data. It includes only import statements, a test command (pytest on a local directory), and no destructive or exfiltration operations. There is no use of curl, shell commands, or disabling of safety measures. The risk is minimal.

No concerns found

Examples

Fit a Bayesian hierarchical model
Using geo-infer-bayes, fit a Bayesian hierarchical model with partial pooling to the geospatial dataset 'land_use.csv' with priors, run MCMC for 2000 samples, and compute WAIC.
Compare two geospatial models
Compare a Gaussian process model and a linear Bayesian model on the spatial data using LOO-CV with geo-infer-bayes.

name: geo-infer-bayes description: Bayesian inference and probabilistic modeling for geospatial data. Use when building hierarchical models, computing posteriors with PyMC or TFP, performing variational inference, model comparison (LOO/WAIC/DIC), or spatial Gaussian processes. prerequisites: required: - geo-infer-math recommended: - geo-infer-space - geo-infer-data difficulty: advanced estimated_time: 60min examples_dir: ../GEO-INFER-EXAMPLES/examples/

GEO-INFER-BAYES

Instructions

Core Capabilities

  • Bayesian inference: Full posterior computation via MCMC and variational methods
  • Model comparison: LOO-CV, WAIC, DIC, BIC, AIC (all real implementations)
  • Gaussian processes: Cholesky-decomposition GP with multiple kernels
  • Hierarchical models: Partial pooling via Cholesky LKJ decomposition
  • Prior specification: Jeffreys, reference, unit-information priors
  • ELBO computation: Real evidence lower bound (not placeholder)

Key Imports

from geo_infer_bayes.core.bayesian_inference import BayesianModel
from geo_infer_bayes.core.gaussian_process import GaussianProcess
from geo_infer_bayes.core.variational import VariationalInference
from geo_infer_bayes.api.pymc_interface import PyMCInterface
from geo_infer_bayes.api.tfp_interface import TFPInterface

Examples

from geo_infer_bayes.core.bayesian_inference import BayesianModel

model = BayesianModel(prior="normal", likelihood="normal")
posterior = model.fit(data, n_samples=2000)
comparison = model.compare(["model_a", "model_b"], method="loo")

Guidelines

  • GP uses Cholesky decomposition (real, not stub)
  • TFP interface: real GP + Metropolis-Hastings sampling
  • PyMC interface: posterior predictive sampling for predictions
  • Variational: real ELBO computation with KL divergence
  • Test: uv run python -m pytest GEO-INFER-BAYES/tests/ -v

Integrations

  • ACT → Active Inference belief updating and free energy
  • MATH → Spatial statistics feeding Bayesian models
  • SPM → Bayesian GLM fitting for parametric maps
  • AI → Bayesian hyperparameter optimization
  • RISK → Bayesian uncertainty quantification for risk
Related skills