This repository shows the code used in "Inception for Petroleum Analysis" for cetane number prediction. Study published in Fuel (Elsevier), 2025.
Convolutions with kernel size 3 are shown in blue, convolutions with kernel size 1 are shown in red. The numbers of neurons are shown under each computational blocks. For more details, verify on the paper under the section -> Methodology / Deep learning.
Install MATLAB R2022b and Eigenvector PLS_Toolbox version 9.2.
Open the script within the eponymous software.
Build the docker image (using CPU):
docker build -t inception-petroleum-analysis .Run and access to the output the of docker image:
docker run -it --rm inception-petroleum-analysisThis environment expect miniconda/anaconda already installed.
Follow the next commands:
conda env create -f environment.ymlActivate the environment and launch models calibration with:
conda activate inception-petroleum-analysis && python -m scripts.models-calibrationThis script can be adapted to different needs.
Inside the main() function, three different approaches are possible:
- comparing the two models using the compare_models() function,
- using a very simple approach via the basic_usage() function,
- modifying a configuration via config_from_dict().
This code has been rewritten to be more modular and allow for testing different model configurations, as well as extension to other architectures. To do this, a practitioner can develop the following classes (found on eponym file under directory "src.model_utils"): ModelType, BaseModelConfig, BaseModelPipeline, and finally update class ModelFactory (especially methods: _registry and _config_registry.
Information : all y are already normalized to follow entreprise policy, the scaler is not given. Therefore, calculated metrics will be roughly 10 times smaller than on the publication.
- PLS will be fed using X and y from 'data/raw-kennard-full_range.mat', y is already normalized (centered) but X are raw.
- IPA and DeepSpectra will be fed using y from 'y_train_scaled.csv' and 'y_test_scaled.csv' (mean 0 & std 1), the X comes raw from 'data/raw-kennard-full_range.mat' or feature selected from 'data/raw-kennard-reduced_range.mat'

