ThermoProfiler is a Python package for predicting thermal rock properties for sedimentary rocks from well logs using machine learning models.
It supports multiple model types (XGBOOST, ADABOOST, RF, LINEAR).
- Predicts:
- Thermal Conductivity (
TC) - Specific Heat Capacity (
SHC) - Thermal Diffusivity (
TD)
- Thermal Conductivity (
- Dual prediction strategy:
- MAPE-optimal → best available log combination (lowest uncertainty).
- Raw logs → exactly matches the available logs.
- Provides uncertainty estimates (MAPE %) for each prediction.
- Supports export to TXT and LAS files.
- Includes a step-by-step Jupyter notebook tutorial.
Clone and install dependencies:
git clone https://github.com/yourusername/thermoprofiler.git
cd thermoprofiler
# create and activate Python 3.11 virtual environment
py -3.11 -m venv .venv
source .venv/Scripts/activate # on Windows: .\.venv\Scripts\activate
# upgrade pip + base tools
python -m pip install --upgrade pip setuptools wheel
# install dependencies
pip install -r requirements.txt
Requirements:
numpy==1.25.2pandas>=1.5.3scikit-learn==1.2.1joblib>=1.2.0lasio>=0.30.0
import pandas as pd
from thermoprofiler.preprocessing import clean_log_dataframe
from thermoprofiler.prediction import predict_all_properties
from thermoprofiler.export import export_to_txt, export_to_las
# Load your well log dataset
df = pd.read_csv("input_logs.csv")
# Preprocess (standardize column names, clean missing values)
df = clean_log_dataframe(df)
# Run predictions
results = predict_all_properties(df, model_type="XGBOOST")
# Export results
export_to_txt(results, "predictions.txt")
export_to_las(results, "predictions.las", depth_col="Depth")
print(results.head())The returned DataFrame contains the following new columns for each property (TC, SHC, TD):
model_number_{prop}→ MAPE-optimal model number used.uncertainty_{prop}→ Uncertainty (MAPE %) for the optimal model.model_number_raw_{prop}→ Model number reflecting the actual available logs.{prop}_prediction→ Prediction using the MAPE-optimal model.{prop}_prediction_raw→ Prediction using the raw-log model.
| Depth | Rock_type | model_number_TC | uncertainty_TC | model_number_raw_TC | TC_prediction | TC_prediction_raw |
|---|---|---|---|---|---|---|
| 1000 | 3 (Clastics) | 15 | 7.7 | 11 | 2.15 | 2.05 |
| 1005 | 2 (Carbonates) | 12 | 5.3 | 5 | 2.42 | 2.38 |
- Logs accepted:
RHOB,PHIN,VSH,VP. - Rock type column required:
1= Evaporites2= Carbonates3= Clastics
- Missing logs handled automatically → falls back to the available combination.
- Models are stored in
compiled_models/{ROCK_TYPE}/{MODEL_TYPE}/{PROPERTY}/. - Format:
joblibfiles. - Model numbers (1–15) correspond to predefined log combinations (see
config.py).
| Model # | Logs Used |
|---|---|
| 1 | ['RHOB'] |
| 2 | ['PHIN'] |
| 3 | ['VSH'] |
| 4 | ['VP'] |
| 5 | ['RHOB', 'PHIN'] |
| 6 | ['RHOB', 'VSH'] |
| 7 | ['RHOB', 'VP'] |
| 8 | ['PHIN', 'VSH'] |
| 9 | ['PHIN', 'VP'] |
| 10 | ['VSH', 'VP'] |
| 11 | ['RHOB', 'PHIN', 'VSH'] |
| 12 | ['RHOB', 'PHIN', 'VP'] |
| 13 | ['RHOB', 'VSH', 'VP'] |
| 14 | ['PHIN', 'VSH', 'VP'] |
| 15 | ['RHOB', 'PHIN', 'VSH', 'VP'] |
A complete example workflow is available in:
notebook_tutorial/predict_thermalproperties.ipynb
This notebook guides you through:
- Preparing your input logs.
- Cleaning and standardizing data.
- Running predictions.
- Exporting results to TXT or LAS files.
If you use this package, please cite:
Hosseini-Nasab, S. M., Mousavi, S. H. R., & Fuchs, S. (2025).
Thermal-property profiles from well-logs in sedimentary rocks: a novel machine-learning-based prediction tool trained on physically modelled synthetic data.
Geophysical Journal International, 243(1). https://doi.org/10.1093/gji/ggaf260
If you encounter problems, please open an Issue in the GitHub repository.