Where to start
Learn tabular classification and spatial data handling with Xarray and GeoPandas first. Split by well or region rather than by row, because neighbouring samples share geology.
How machine learning is used in geoscience
Predicting rock type from well logs
Classifiers learn the relationship between log curves such as gamma ray, resistivity and density and the facies described in cored wells. They then label uncored wells quickly and consistently, leaving geologists to check difficult intervals.
Real example: SEG 2016 machine learning contest. A public contest from The Leading Edge in which teams trained facies classifiers on well-log data, with submissions and code published on GitHub.
Mapping soils and surface properties
Models relate point samples to environmental covariates such as terrain, climate, vegetation and geology, then predict a continuous map with an uncertainty for each cell. This is called digital soil mapping.
Real example: SoilGrids 2.0 (Poggio et al., SOIL, 2021). Produces global maps of soil properties at 250 m resolution with machine learning, using about 240,000 soil observations and over 400 environmental covariates, with quantified spatial uncertainty.
Detecting and cataloguing earthquakes
Deep learning models scan continuous seismic records, detect earthquakes and pick P and S wave arrivals. The resulting catalogues include many more small events than manual review can produce.
Real example: EQTransformer (Mousavi et al., Nature Communications, 2020). An attention-based deep learning model for simultaneous earthquake detection and phase picking in seismic records.
Can geoscientists learn machine learning?
Yes. Geoscientists who are comfortable with data and statistics can add machine learning step by step: Python, spatial and tabular data handling, classical models with spatially aware validation, then deep learning for images and waveforms.
- Python. Read well logs, rasters and seismic files with Python libraries such as lasio, rasterio and ObsPy. Taught in the Python track of Foundations of AI
- Data handling. Clean and join tables of samples, logs and coordinates with pandas. Taught in the Data Tools track of Foundations of AI
- Statistics and geostatistics. Spatial correlation, kriging and uncertainty are the baselines every machine learning map is compared with. Taught in the Statistics track of Foundations of AI
- Classical models with spatial validation. Random forests and gradient boosting, validated by holding out whole wells or regions. Taught in the Machine Learning track of Foundations of AI
- Deep learning for images and waveforms. Convolutional networks and transformers for imagery, seismic sections and earthquake records. Covered by the Deep Learning course (coming next)
Moving into machine learning for geoscience
If you already work in the field
Geoscientists know what the measurements mean, where they are unreliable and what a geologically sensible map looks like. Add Python and classical machine learning, then rework a project you know, such as a facies or soil map, and compare the result with your existing interpretation. Geological surveys, energy and mining companies and research institutes all hire for this mix.
If you come from data science or ML
Data scientists should learn the basics of the relevant subfield, such as stratigraphy, soils or seismology, plus coordinate systems and why spatial correlation breaks random train-test splits. Working through an open geoscience dataset with a domain partner is the fastest way to learn which errors matter.
Roles that do this work: Geoscience data scientistGeostatisticianPetrophysicistDigital soil mapping scientistSeismologist
Tools you will use
| Tool | What you use it for |
|---|---|
| Xarray | Handle gridded geoscience data such as climate, seismic and satellite cubes. |
| GeoPandas | Join samples, wells and mapped units by location. |
| Verde | Grid and interpolate scattered spatial measurements with cross-validation. |
| lasio | Read well-log LAS files into tables for modelling. |
| scikit-learn | Train lithology classifiers and spatial regression models. |
Public data to practise on
- FORCE 2020 well-log lithology: Well logs from the Norwegian North Sea with interpreted lithology labels for supervised classification.
- USGS Earthquake Catalog: Searchable global earthquake locations, depths and magnitudes for spatial and temporal analysis.
Your first project
Download the FORCE 2020 well-log data, predict lithology from gamma-ray, density, neutron and sonic logs with gradient boosting, and compare it with a majority-class baseline using balanced accuracy on held-out wells.
Keep the result, your code and a short note on what didn't work. That record is worth more than the score.