activeinferenceinstitute/geo-infer/geo-infer-bayes
Claude Code and agent skill by activeinferenceinstitute/geo-infer
- community
Checking that the SKILL.md file is still in the repository.
Bayesian inference and probabilistic modeling for geospatial data. Use when building hierarchical models, computing posteriors with PyMC, performing variational inference, model comparison (LOO/WAIC/DIC), or spatial Gaussian processes.
Install
npx vskill@latest install activeinferenceinstitute/geo-infer/geo-infer-bayesSKILL.md
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: Exact Cholesky and batched inducing-point variational GPs
- ELBO computation: Real evidence lower bound (not placeholder)
- Out of scope: partial pooling via Cholesky LKJ decomposition, and
Jeffreys / reference / unit-information priors. Implemented priors live in geo_infer_bayes.utils.priors (ICAR, BYM, Leroux, AR1, RW1, RW2, GP).
Key Imports
Examples
Every snippet below runs against the current API.
Fit a spatial Gaussian process by MCMC. BayesianInference.run hands the data back to the model afterwards, so the returned posterior can predict without a separate fit call:
Fit a large spatial dataset without constructing an observation-by-observation covariance matrix. Supplied inducing locations are fixed; omit them to select a deterministic maximin subset. fit optimizes the collapsed variational ELBO by default:
Convergence diagnostics. Samplers return draws pooled across chains, and R-hat is a between-chain statistic, so split the chain axis back out first:
Predict with calibrated uncertainty. The returned std is the total predictive standard deviation of the latent function -- the mean conditional GP variance across posterior draws plus the variance of the per-draw means. It excludes observation noise, which belongs to posterior_predictive:
Model comparison by LOO. A GP likelihood is joint, so pointwise_log_likelihood supplies the per-observation terms LOO needs, via the ordered-conditional decomposition of the marginal likelihood:
Reproducibility
Every sampler and predictive method takes a random_seed routed through geo_infer_bayes.utils.rng.resolve_rng, which accepts None, an int, a SeedSequence, a BitGenerator, or a numpy.random.Generator, and always returns a Generator; numpy.random.RandomState and the numpy.random module raise TypeError. Consequences worth knowing:
- Passing an
intmakes a chain replayable;0is a valid seed. - Passing a
Generatorthreads one stream through a whole pipeline. Nonemeans OS entropy, so results are not replayable. Calling
np.random.seed(...) does not make them so: this module never reads the process-wide singleton, and never advances it either.
- For independent parallel chains use
geo_infer_bayes.utils.rng.spawn_rng(seed, n) rather than seed, seed + 1, ... which carries no independence guarantee.
- At boundaries that accept only an
intseed, such as scikit-learn's
random_state, use geo_infer_bayes.utils.rng.derive_int_seed.
Agent interfaces
Use uv run --frozen geo-infer catalog BAYES to discover public source APIs, then geo-infer describe before calling a selected target. Scripts use geo_infer_api.agent_runtime.AgentSession; the optional stdio MCP server is geo-infer-mcp. See requests, native objects and composition. The adapter retains this module's dependencies and authorization requirements.
Guidelines
- GP uses actual Cholesky decomposition
- Sparse GP fit uses batched
NbyMkernel blocks andMbyM
sufficient statistics; it never builds a dense N by N covariance
- TFP interface: real GP + Metropolis-Hastings sampling
- PyMC interface: posterior predictive sampling for predictions
- Variational: real ELBO computation with KL divergence
- Posterior predictions average over draws spread across the chain, not the
first N draws; the count comes from the draw axis, not from the number of parameter names
- LOO and WAIC need a posterior pointwise log-likelihood matrix. Passing data
without one falls back to prior draws, which is not cross-validation and whose elpd is not comparable with a posterior-based one
- Test:
uv run python GEO-INFER-TEST/run_unified_tests.py --module BAYES
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
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingGEO-INFER-BAYES/SKILL.md
Popularity
- Repository stars
- 10
- Repository forks
- 1
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/activeinferenceinstitute/geo-infer/geo-infer-bayes)