Advanced Gaussian Process Regression and Kriging toolkit for SPE9 reservoir modeling
Project description
PyGeomodeling
Advanced Gaussian Process Regression and Kriging toolkit for SPE9 reservoir modeling. This toolkit provides a comprehensive framework for spatial modeling of reservoir properties using both traditional Gaussian Process models and cutting-edge Deep Gaussian Process architectures.
Key Features
Core Capabilities
- GRDECL Parser: Load and parse Eclipse GRDECL files with automatic property extraction
- Unified Toolkit: Single interface supporting both scikit-learn and GPyTorch workflows
- Advanced Models: Traditional GP (RBF, Matérn, Combined kernels) and Deep GP with neural network features
- Rich Visualization: Comprehensive plotting utilities for model comparison and spatial analysis
Features (v0.3.0)
- Error Handling: Comprehensive validation with helpful error messages
- Model Serialization: Save/load models with versioning and metadata
- Spatial Cross-Validation: Proper validation for geostatistical data
- Parallel Processing: 3-4x speedup with multi-core training
- Hyperparameter Tuning: Optuna integration for optimization
- Variogram Analysis: Semi-variogram modeling for spatial correlation (NEW!)
- Tutorial Notebooks: Interactive learning with Jupyter
- Research-Ready: Built for reproducible scientific research
Installation
Basic Installation (Traditional GP Models)
pip install pygeomodeling
With Advanced Deep GP Features
pip install pygeomodeling[advanced]
Complete Installation (All Features)
pip install pygeomodeling[all]
Development Installation
git clone https://github.com/kylejones200/pygeomodeling.git
cd pygeomodeling
./setup_dev.sh # Automated setup
# or manually: pip install -e ".[dev,docs,all]"
Quick Start
Basic Usage
from pygeomodeling import GRDECLParser, UnifiedSPE9Toolkit
# Load SPE9 dataset
parser = GRDECLParser('path/to/SPE9.GRDECL')
data = parser.load_data()
# Create toolkit and train model
toolkit = UnifiedSPE9Toolkit()
toolkit.load_spe9_data(data)
X_train, X_test, y_train, y_test = toolkit.create_train_test_split()
# Train traditional GP model
model = toolkit.create_sklearn_model('gpr', kernel_type='combined')
toolkit.train_sklearn_model(model, 'combined_gpr')
results = toolkit.evaluate_model('combined_gpr', X_test, y_test)
print(f"R² Score: {results.r2:.4f}")
Deep GP Experiment
from pygeomodeling import DeepGPExperiment
# Run comprehensive comparison
experiment = DeepGPExperiment()
results = experiment.run_comparison_experiment()
# Results automatically saved to deep_gp_comparison.png
print(f"Best model: {max(results.keys(), key=lambda x: results[x]['metrics']['r2_score'])}")
What's Included
Core Modules
grdecl_parser.py: Eclipse GRDECL file parser with SPE9 supportunified_toolkit.py: Main toolkit with sklearn and GPyTorch backendsmodel_gp.py: Advanced GPyTorch models (Standard GP, Deep GP)plot.py: Comprehensive visualization utilitiesdeep_gp_experiment.py: Ready-to-run comparison experiments
Example Scripts
main.py: Traditional geomodeling workflowpackage.py: Packaging and distribution helper
Scientific Applications
This toolkit has been designed for:
- Reservoir Modeling: Spatial interpolation of permeability and porosity
- Uncertainty Quantification: Gaussian Process uncertainty estimates
- Model Comparison: Traditional vs Deep GP performance analysis
- Geostatistical Research: Advanced spatial modeling techniques
Model Performance
Based on SPE9 reservoir dataset analysis:
- Traditional GP (Combined Kernel): R² = 0.277 (Best)
- Deep GP (Small): R² = 0.189
- Training Time: ~1.3-1.8 seconds per model
Traditional Gaussian Process models with combined RBF+Matérn kernels outperform Deep GP models for SPE9 spatial patterns, demonstrating the effectiveness of classical geostatistical approaches for this dataset.
Dependencies
Core Dependencies (Always Installed)
- numpy >= 1.24.0
- pandas >= 1.5.0
- scikit-learn >= 1.3.0
- matplotlib >= 3.7.0
- pykrige >= 1.6.0
Optional Dependencies
- Advanced: torch, gpytorch, botorch, optuna (for Deep GP models)
- Geospatial: rasterio, geopandas, shapely (for advanced spatial analysis)
- Performance: numba (for JIT compilation)
- Visualization: matplotlib, signalplot (for publication-quality plots)
Documentation
Tutorial notebooks are available in the examples/ directory.
Contributing
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For questions, issues, or contributions:
- Issues: GitHub Issues
- Email: kyletjones@gmail.com
- Documentation: Project Wiki
Citation
If you use this toolkit in your research, please cite:
@software{jones2025spe9geomodeling,
title={SPE9 Geomodeling Toolkit: Advanced Gaussian Process Regression for Reservoir Modeling},
author={Jones, Kyle T.},
year={2025},
url={https://github.com/kylejones200/pygeomodeling}
}
Outputs
PERMX_GPR.GRDECL: predicted permeability in GRDECL formatSIGMA_GPR.GRDECL: standard deviation (uncertainty) of predictionsgpr_prediction_slices.png: side-by-side slice visualization
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygeomodeling-0.3.1.tar.gz.
File metadata
- Download URL: pygeomodeling-0.3.1.tar.gz
- Upload date:
- Size: 173.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b437bf5b4e0e00eaf5c55b26f63a8f2bacc28819d74e37c2f41af811e4e394d
|
|
| MD5 |
c055c608650258f4089bb4612b8ea607
|
|
| BLAKE2b-256 |
a2f43b57a8b9cae4d9abb3cd69e11de3bc0e4f56b6bfdab64805c5b8457f6a2d
|
Provenance
The following attestation bundles were made for pygeomodeling-0.3.1.tar.gz:
Publisher:
workflow.yml on kylejones200/pygeomodeling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygeomodeling-0.3.1.tar.gz -
Subject digest:
6b437bf5b4e0e00eaf5c55b26f63a8f2bacc28819d74e37c2f41af811e4e394d - Sigstore transparency entry: 773397514
- Sigstore integration time:
-
Permalink:
kylejones200/pygeomodeling@8af805a6fbc96fcb5eec874cf7cf54645a2af1b8 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/kylejones200
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@8af805a6fbc96fcb5eec874cf7cf54645a2af1b8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pygeomodeling-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pygeomodeling-0.3.1-py3-none-any.whl
- Upload date:
- Size: 169.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e38b6f77e452855726ede3005c9e0fce173dd37e1d57cb23e5b23a4b9e2e55da
|
|
| MD5 |
bad8b2817890e349ee3f15875fe24aa5
|
|
| BLAKE2b-256 |
1069ce0ea715827e3870a822ea9bef37eb448e87fdc631d0f42f22d47b86331b
|
Provenance
The following attestation bundles were made for pygeomodeling-0.3.1-py3-none-any.whl:
Publisher:
workflow.yml on kylejones200/pygeomodeling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygeomodeling-0.3.1-py3-none-any.whl -
Subject digest:
e38b6f77e452855726ede3005c9e0fce173dd37e1d57cb23e5b23a4b9e2e55da - Sigstore transparency entry: 773397521
- Sigstore integration time:
-
Permalink:
kylejones200/pygeomodeling@8af805a6fbc96fcb5eec874cf7cf54645a2af1b8 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/kylejones200
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@8af805a6fbc96fcb5eec874cf7cf54645a2af1b8 -
Trigger Event:
push
-
Statement type: