Bayesian Inference for Geospatial Data

VerifiedSafe

Advanced probabilistic modeling with full Bayesian inference, Gaussian processes, and hierarchical models. Implements MCMC, variational inference, and model comparison (LOO/WAIC/DIC) for geospatial analysis.

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

Recommended for

Our review

Performs rigorous Bayesian inference on geospatial data, including Gaussian processes, hierarchical models, and model comparison via LOO/WAIC/DIC.

Strengths

  • Full posterior computation via MCMC and variational methods
  • Real implementations of model comparison (LOO-CV, WAIC, DIC, BIC, AIC)
  • Cholesky-decomposition Gaussian processes with multiple kernels
  • Integrates with other skills (ACT, MATH, SPM, AI, RISK)

Limitations

  • Requires strong foundational knowledge of Bayesian statistics (prerequisite geo-infer-math)
  • Computationally intensive for large spatial datasets
  • Dependencies on PyMC and TensorFlow Probability may have version conflicts
When to use it

Use when you need rigorous Bayesian analysis of geospatial data, including hierarchical models, Gaussian processes, and model comparison.

When not to use it

Avoid when simpler frequentist methods suffice or when data is too large for MCMC without advanced approximations.

Security analysis

Safe
Quality score85/100

The skill provides instructional content on Bayesian inference without any system-level commands, network operations, or destructive actions. The only mentioned command is running pytest tests, which is benign and standard.

No concerns found

Examples

Build a Bayesian hierarchical model for regional crime rates
Using the geo-infer-bayes skill, create a hierarchical Bayesian model to analyze crime rates across different neighborhoods in a city. Include partial pooling with Cholesky LKJ decomposition and compute WAIC for model comparison.
Fit a Gaussian process to temperature anomalies
Apply the geo-infer-bayes GaussianProcess class with a Matérn kernel to fit temperature anomaly data from weather stations. Use MCMC sampling and plot the posterior mean with credible intervals.
Perform variational inference for large spatial counts
Use geo-infer-bayes VariationalInference to approximate the posterior of a Poisson spatial model with thousands of locations. Compute the ELBO and compare with full MCMC results on a subset.

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