All notable changes to Geostatex are documented here. The format follows Keep a Changelog and the project adheres to Semantic Versioning.
Unreleased
0.6.0 - 2026-11-26
The first public release, and the first on Hex. Versions 0.1.0 to 0.5.0 were released privately; their entries below are kept as the history of the features.
Added
- Hex package with precompiled NIFs (Linux glibc and musl, macOS, Windows; NIF 2.16 and 2.17): no Rust toolchain is needed on those platforms.
CONTRIBUTING.md,SECURITY.mdand the licence texts of the reference libraries.
Changed
rustlerandjasonare optional dependencies. A source build (GEOSTATEX_BUILD=1, a checkout or a Git dependency) needs{:rustler, "~> 0.38", runtime: false}in your own dependencies.- The GeoFrame adapter is tested against GeoFrame 0.3.3 from Hex, and the notebooks install it from there.
- Licence: LGPL-3.0-only instead of Apache-2.0. Simple kriging, the random fields and the
GSTools covariance models were ported from the source of GSTools (LGPL-3.0), so the library is
a derivative work of it.
NOTICEnow states the origin of each part, and the licence texts of scikit-gstat, PyKrige, NumPy, SciPy and scikit-learn ship inLICENSES/. Earlier versions were released privately only. - The generalised exponential integral and the regularised incomplete beta function are implemented from the NIST DLMF on a generic continued-fraction evaluator; results are unchanged within 1e-12.
[0.5.0] - 2026-11-14
The planned milestones M16 to M18 are complete: classification kriging, GSTools' covariance models and scikit-gstat's manual fit controls.
Added
- Classification kriging (M16),
Geostatex.ClassificationKrigingafter PyKrige'sClassificationKriging: a classifier's class probabilities ({fit, predict_proba}functions) corrected by kriging the isometric log-ratio residuals of the one-hot labels;fit/4,predict/3,predict_proba/3,krige_residual/2,score/4,ilr/1,inverse_ilr/1. Verified against PyKrige to 1e-8;predict/3returns the classes where PyKrige returns their indices. - GSTools covariance models (M17):
:integral,:rational,:circular,:superspherical(GSTools' HyperSpherical withnu = (dim - 1) / 2),:jbessel,:tpl_gaussian,:tpl_exponential,:tpl_stableand:tpl_simple, withrangeas GSTools'len_scale(rescale = 1): inVariogram.new/3fits (all but:tpl_stable) and as kriging models with their shape in:variogram_parameters. Verified against GSTools 1.7.0 (variograms to 1e-10, ordinary kriging to 1e-8). - Manual fit controls (M18):
Variogram.new/3withfit_bounds: {lower, upper}andfit_p0:(scikit-gstat'sfit_boundsandfit_p0), for:trf(both),:lm(the start) and:ml((0, fit_p0)); verified against scikit-gstat (its objective or lower, the same binding bounds).
[0.4.0] - 2026-11-13
The planned milestone M15 is complete: block kriging and ordinary cokriging with a linear model of coregionalisation, verified against R gstat.
Added
- Block kriging (M15):
Kriging.execute/5withblock: {dx, dy}(gstat's 4 x 4 Gauss-Legendre discretisation) orblock_points:(offsets from the centre, equal weights), for ordinary kriging; verified against R gstat (estimates to 1e-12, variances to 2e-9). - Ordinary cokriging with a linear model of coregionalisation (M15),
Geostatex.Cokriging:new/2,execute/5(each variable's estimate and variance, and the error covariances; isotopic or heterotopic data) andfit_lmc/3(gstat'sfit.lmcwith fixed ranges); verified against R gstat to 1e-8.
[0.3.0] - 2026-11-13
The planned milestones M12 to M14 are complete: large data sets, simple kriging and Gaussian simulation (GSTools), indicator kriging.
Added
- Memory guard: every-pair variograms, space-time variograms, global kriging and the distance
table of a custom variogram that would not fit in the available memory raise
ArgumentError(with the memory needed and a hint:samples:orn_closest_points:) instead of aborting the VM.Kriging.statistics/1andKriging.cross_validate/4run fewer systems or folds at a time when memory is short. - Dev-only benchmark
bench/large_data.exs; the measured limits are in the README. - Simple kriging with a known mean (M13):
Kriging.simple/3andsimple_3d/3(gstools.krige.Simple), verified against GSTools 1.7.0 to 1e-8. - Gaussian random fields (M13),
Geostatex.Simulation:unconditional/4andunconditional_3d/5(gstools.SRF, randomisation method),conditional/5andconditional_3d/6(gstools.CondSRF, conditioned by simple or ordinary kriging). Seeded as GSTools: a seed gives GSTools' field for 2D exponential and gaussian models (to 1e-9); 3D and spherical models are sampled exactly where GSTools uses MCMC. - Indicator kriging (M14),
Geostatex.IndicatorKriging: the indicators at given thresholds, an ordinary kriging per threshold (each matching PyKrige's on the indicators to 1e-8), GSLIB's order-relation correction, and per target the conditional distribution, the exceedance probabilities and the E-type mean; 2D and 3D.
Changed
- Faster kriging, with the same results bit for bit (M12): global kriging reads the inverse in memory order and predicts the targets in parallel (5000 points, 1000 targets: 141.6 s to 7.9 s); the moving window finds its neighbours with a k-d tree, same neighbours in the same order (10k points: 0.40 s to 0.004 s); PyKrige's automatic variogram no longer stores every pair (10k points: 768 MB to 4 MB).
Kriging.statistics/1andKriging.cross_validate/4run in parallel (about 8x faster on 16 cores, about 20x for a windowed cross-validation). The folds run in tasks, so a custom:variogram_functionis called from those processes; the first failing fold still raises its own error.
[0.2.0] - 2026-11-13
The planned milestones M9 to M11 are complete: experimental variogram options, model fitting and kriging extensions.
Added
- Release workflow (
.github/workflows/release.yml): av*tag builds the precompiled NIFs (six targets, NIF 2.16 and 2.17) and attaches them to the GitHub release; the Hex package includes their checksum file once it exists. Source builds remain the default. Variogram.new/3accepts thescipymetrics:sqeuclidean,:seuclidean,:canberra,:braycurtis,:cosine,:mahalanobisand:minkowskias:dist_func, verified against scikit-gstat.- Cross-variograms:
Variogram.new/3withco_values:(scikit-gstat's definition, or the classical cross-semivariogram withcross: :classical) andVariogram.cross_variograms/3. - Pair sampling:
Variogram.new/3withsamples:andseed:measures only the pairs between two random subsets of the points, reproducing scikit-gstat's draws (numpy's SeedSequence and Mersenne Twister) bit for bit. fit_sigma: :entropy: each lag weighted by the inverse Shannon entropy of its value differences, as scikit-gstat.fit_method: :ml: scikit-gstat's maximum-likelihood fit (least squares within the:trfbounds, residuals oversqrt(sigma)), including the cases where scikit-gstat's own SLSQP fit fails.- Harmonized variograms (
model: :harmonize): the isotonic regression of the experimental variogram, as scikit-gstat, with the range reported as a distance. - Summed models (
model: [:spherical, :gaussian]): fitted within each component's bounds and evaluated bymodel_values/3, as scikit-gstat's"spherical+gaussian". - Custom variograms in kriging (
variogram_model: :customwithvariogram_function:andvariogram_parameters:), as PyKrige's"custom"model, for ordinary, universal and 3D kriging, their statistics and cross-validation. Geostatex.RegressionKriging: regression kriging after PyKrige'sRegressionKriging, with a built-in linear regression or any{fit, predict}pair of functions.
Fixed
- A bounded fit (
fit_method: :trf) of all-negative semivariances returns an error instead of crashing the NIF.
[0.1.0] - 2026-11-12
First release: the planned milestones M0 to M8 are complete.
Added
- Project foundation: Mix project with a Rust workspace (
geostatex_core,geostatex_native), the shared input contractGeostatex.Input(lists, Nx tensors, Explorer series), the oracle fixture harness and CI. Geostatex.Variogram.new/3: experimental variograms afterskgstat.Variogram(seven estimators, eight lag rules or explicit edges,maxlagforms, three metrics), verified against scikit-gstat to 1e-9.- Variogram models and fitting (
:model,:fit_method,:use_nugget,:fit_sigma, manual parameters) with scikit-gstat's goodness-of-fit measures,transform/2andmodel_values/3; model functions equal scikit-gstat's to 1e-12 (Matérn included), and fits reach scikit-gstat's optimum or a better one where scipy stops in a local minimum. Geostatex.Kriging: ordinary kriging afterpykrige.OrdinaryKriging(PyKrige's six variogram models, automatic variogram, points / grid / masked, exact values, pseudo-inverses, moving window, anisotropy, geographic coordinates), predictions equal to PyKrige's to 1e-8.Geostatex.Kriging.universal/3: universal kriging afterpykrige.UniversalKrigingwith regional linear, point-log, external grid, specified and functional drifts.- Directional variograms:
Variogram.new/3withdirection: [azimuth:, tolerance:, bandwidth:, model:]afterskgstat.DirectionalVariogram(triangle and compass search areas). Geostatex.GeoFrame: variograms, kriging models, cross-validation, predictions and prediction grids from GeoFrame frames (runtime adapter, GeoFrame optional).- Notebooks, in English and Spanish: the Meuse heavy metals, Baltimore house prices and US state income (space-time) use cases, a machine-learning use case (Scholar and Axon models with spatial-block validation and regression kriging), a hybrid XGBoost notebook (Python cells through Pythonx) and an aerial-image deep-learning notebook (pretrained ResNet-18 features); in English only, the aerial-image features on 2,000 King County sales.
- Model statistics and cross-validation:
Kriging.statistics/1(PyKrige'sdelta,sigma,epsilon,Q1,Q2,cR) andKriging.cross_validate/4(leave-one-out with MSE, RMSE, MAE). - Space-time variograms:
Geostatex.SpaceTimeVariogramafterskgstat.SpaceTimeVariogram(experimental grid, marginal variograms, sum, product and product-sum models). - 3D kriging:
ordinary_3d/3,universal_3d/3andexecute_3d/6after PyKrige'sOrdinaryKriging3DandUniversalKriging3D.
Fixed
- Variogram fits bound the range by the last lag edge, empty lags included, as scikit-gstat does (they used the last non-empty lag).