Scikit Gstatのロゴ

Scikit Gstat

コミュニティ
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.

概要

公開者SteadfastAsArt
リポジトリgeoscience-skills
スキル名scikit-gstat
スター
75
フォーク
9
同梱ファイル
3
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    SteadfastAsArtがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルScikit GstatをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/SteadfastAsArt/geoscience-skills/tree/main/scikit-gstat
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでScikit Gstatを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にScikit Gstatを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Scikit Gstatは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでScikit Gstatを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Scikit Gstatはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにScikit Gstatをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/SteadfastAsArt/geoscience-skills/tree/main/scikit-gstatを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Scikit Gstatを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Scikit Gstatは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもScikit Gstatを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Scikit Gstat」は無料ですか?

はい。SteadfastAsArtがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇