Member-only story
Handling Categorical Geological Data in Machine Learning Models
What label, ordinal, and one hot encoding each tell a model about your rocks
Machine learning has become a common part of petrophysical workflows, from predicting missing curves to classifying facies. Most of the data we feed these models is continuous, eg. gamma ray, density, neutron porosity, sonic compressional. But, alongside the curves, almost every project carries categorical data too. This includes formation names, facies schemes, zonations, and lithology descriptions.
The problem is that machine learning models can’t use them directly. A linear regression, a neural network, or a support vector machine works entirely in numbers. It can multiply a gamma ray value by a coefficient, but it cannot multiply text strings by anything. So before a formation column can go into a machine learning model, it has to be converted into numeric values. There are different ways to do this, and choosing which method can impact how the model(s) treat those values and information.
In this article, we will look at what encoding is, the common options, and why one hot encoding is usually a safe choice. We will then test it on a simple, but real dataset from the Volve field to see how much difference the choice of encoding method makes.










