GEO INFER AI

From ActiveInferenceInstitute/GEO-INFER · View interactive version

GEO INFER AI is an AI agent skill from the GitHub repository ActiveInferenceInstitute/GEO-INFER. Machine learning pipelines and model selection for geospatial AI. Use when training spatial ML models, building prediction pipelines, performing feature engineering on geographic data, spatial interpolation/kriging, or evaluating spatial model performance.

How to use this skill

Skill file

GEO-INFER-AI

Instructions

Core Capabilities

updating via EnvironmentalActiveInferenceEngine; multi-scale hierarchical

spatial analysis via MultiScaleHierarchicalAnalyzer with Gaussian-process

and DBSCAN spatial methods

Key Imports

from geo_infer_ai import (
    ModelTrainer,
    TrainingConfig,
    GeospatialModelEvaluator,
    ImageClassifier,
    SpatialPredictor,
    IDWInterpolator,
    OrdinaryKriging,
    GeospatialFeatureEngineer,
    ModelExplainer,
    MLflowPipeline,
    EnvironmentalActiveInferenceEngine,
    MultiScaleHierarchicalAnalyzer,
)

Examples

Train and spatially cross-validate a model:

from sklearn.ensemble import RandomForestRegressor
from geo_infer_ai import GeospatialModelEvaluator

model = RandomForestRegressor(n_estimators=50, random_state=42)
evaluator = GeospatialModelEvaluator()

results = evaluator.cross_validate_spatial(model, X, y, coordinates, n_splits=3)
print(results["mean_score"], results["std_score"])

Fit an IDW interpolator:

import numpy as np
from geo_infer_ai import IDWInterpolator

coords = np.array([[0.0, 0.0], [1.0, 0.0], [0.0, 1.0]])
values = np.array([10.0, 20.0, 30.0])

interpolator = IDWInterpolator(power=2.0).fit(coords, values)
pred = interpolator.predict(np.array([[0.5, 0.5]]))

Spatial feature engineering:

from geo_infer_ai import GeospatialFeatureEngineer

engineer = GeospatialFeatureEngineer(normalize=True)
features = engineer.create_spatial_features(coordinates, include_distances=True)

Agent interfaces

Use uv run --frozen geo-infer catalog AI 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

autocorrelated — it blocks contiguous regions to prevent spatial leakage.

prediction-uncertainty estimates.

it is handled by spatial models and block CV.

Integrations

gracefully to disabled mode when MLflow is absent)

counterparts (see geo_infer_ai.models.predictive docstring for the

deliberate API differences)

Value-tolerance evaluation

Use GeospatialModelEvaluator.evaluate_value_tolerance(y_true, y_pred, tolerance)

for absolute target-value errors and the percentage within a tolerance expressed

in target units. It replaces evaluate_spatial_accuracy; it accepts no coordinates

or geographic buffer argument. Inputs must be matching finite nonempty vectors.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.