Logo vun Scikit Gstat

Scikit Gstat

Communautéit
SteadfastAsArt
scikit-gstat

Estimate and diagnose variograms, perform ordinary kriging, and validate spatial interpolation with SciKit-GStat. Use for empirical or directional variograms, covariance-model comparison and kriging prediction/variance; use PyKrige or GSTools when the task requires universal kriging or external drift.

Iwwersiicht

EditeurSteadfastAsArt
Repositorygeoscience-skills
Skill-Nummscikit-gstat
Stären
75
Forks
9
Matgeliwwert Fichieren
3
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum SteadfastAsArt op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Scikit Gstat an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/SteadfastAsArt/geoscience-skills/tree/main/scikit-gstat
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SteadfastAsArt/geoscience-skills.git /tmp/geoscience-skills
mkdir -p .claude/skills
cp -r /tmp/geoscience-skills/scikit-gstat .claude/skills/scikit-gstat
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Scikit Gstat an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Scikit Gstat automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Scikit Gstat net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

SciKit-GStat

Fit spatial dependence and produce ordinary-kriging estimates with their conditional variances. A fitted variogram is not itself evidence of predictive accuracy or calibrated uncertainty.

Inputs and conventions

Use coordinates shaped (n, 2) and one scalar observation per location. Record the coordinate reference system, distance units, measurement units and sampling support. For a regional Euclidean-distance model, project longitude/latitude into a suitable distance-based CRS before fitting. Resolve trends and repeated locations explicitly; do not silently perturb duplicate coordinates.

Mask missing measurements consistently in coordinates and values. Preserve their identity in the source data; unknown measurements are not zeros. Variances, sills and nuggets have squared measurement units. SciKit-GStat's named sill is the partial sill: the plateau is sill + nugget. Its effective_range uses the library's model-specific convention, not a universally interchangeable correlation length.

Ordinary kriging example

This runnable example uses synthetic measurements and local Cartesian metres. For real work, replace the inputs and establish an appropriate model and support.

python
import numpy as np
import skgstat as skg

rng = np.random.default_rng(13)
coords = rng.uniform(0, 100, (90, 2))  # synthetic local x/y, metres
values = np.sin(coords[:, 0] / 25) + np.cos(coords[:, 1] / 30)
values += rng.normal(0, 0.08, len(coords))  # arbitrary measurement units

grid_coords = np.array([[30., 30.], [50., 50.], [70., 60.]])
V = skg.Variogram(coords, values, model="spherical", n_lags=10,
                  maxlag="median", use_nugget=False)
ok = skg.OrdinaryKriging(V, min_points=3, max_points=12)
predictions = ok.transform(*grid_coords.T)
variance = ok.sigma.copy()  # variance for the MOST RECENT transform, not stddev
supported = np.isfinite(predictions) & np.isfinite(variance)
print(predictions, variance, supported)

transform returns only predictions. return_variance does not enable tuple output. Copy ok.sigma before the next transform, including when processing chunks. Inadequate neighbourhoods may produce NaN; report support and preserve those gaps. Conditional kriging variance excludes uncertainty in fitted variogram parameters, trend choice and sampling bias.

Fit diagnostics and validation

Read parameters by name using V.describe(short=True). Matérn and stable models place a smoothness/shape parameter before their nugget in V.parameters. Evaluate a fitted model with V.transform(lags) so all fitted parameters are retained. See model conventions for parameter meaning, effective ranges and diagnostic examples.

Compare variogram-bin RMSE only as an in-sample diagnostic. For predictive assessment, declare spatial groups or survey holdouts before fitting; refit the variogram and every preprocessing step using each training fold only. Follow the training-only holdout example for this path. OrdinaryKriging is not a scikit-learn estimator that can be passed directly to cross_val_score. Report unpredicted targets alongside RMSE; do not improve a score by quietly dropping poorly supported locations.

DirectionalVariogram can compare azimuths, but different directional ranges alone do not establish significant anisotropy. Inspect pair counts, trends and sampling geometry before changing the covariance or distance model.

Alternatives and outputs

Use PyKrige/GSTools for drift-aware kriging, GeostatsPy for GSLIB-style simulation, and Verde for gridding without a variogram model. SciKit-GStat's built-in interpolator is ordinary kriging; its adapters do not make every object scikit-learn-compatible.

Retain prediction locations, units/CRS, missing/support masks, fitted parameters, training partitions and input provenance. Check outputs against held-out observations and a training-only baseline. Label uncertainties by what they cover.

Bundled diagnostic script

Resolve scripts/variogram_analysis.py relative to this skill. It reads explicitly selected CSV columns, removes rows missing any selected field, and rejects infinities, duplicate locations and constant values. Keep the original CSV to retain dropped-row identities. It compares in-sample fits and directional diagnostics; it does not run predictive validation.

bash
python /path/to/scikit-gstat/scripts/variogram_analysis.py samples.csv \
  --x easting --y northing --z porosity --n-lags 15 --maxlag median \
  --output variogram-results

The nugget is fixed at zero by default; --use-nugget fits it. A numeric --maxlag below 1 means a fraction of maximum pair distance; larger values use coordinate units. JSON preserves effective range, partial sill, nugget and any shape parameter separately. Plots evaluate all fitted parameters. Supply the CRS and units in the surrounding analysis record; this script does not infer or transform them. Check the exported JSON and figures before interpretation.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Scikit Gstat?

Estimate and diagnose variograms, perform ordinary kriging, and validate spatial interpolation with SciKit-GStat. Use for empirical or directional variograms, covariance-model comparison and kriging prediction/variance; use PyKrige or GSTools when the task requires universal kriging or external drift.

Firwat Scikit Gstat op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Scikit Gstat besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Scikit Gstat an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/SteadfastAsArt/geoscience-skills/tree/main/scikit-gstat an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Scikit Gstat benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Scikit Gstat benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Scikit Gstat domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Scikit Gstat gratis?

Jo. De Skill gëtt vum SteadfastAsArt ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇