M. I. Radaideh, M. I. Radaideh, and A. Violi, ”A Bayesian Ensemble Approach for Improved Sustainable Aviation Fuel Modeling”. Energy Conversion and Management: X. 2025, https://doi.org/10.1016/j.ecmx.2025.101287
The ASCENT data was excluded because we do not have permission to share it. Therefore, the results will not match those in the paper.
The best way to run the codes is using Anaconda. Create an Anaconda environment with Python 3.11 and install the required packages using:
conda create -n NAME python=3.11
conda activate NAME
pip install -r requirments.txtReplace NAME in the first line with any name. A GPU is favorable for training Bayesian Neural Networks (BNNs). Check whether Nvidia-cuda was installed using:
import torch
print(torch.cuda.is_available())If this prints False, you can download cuda from Pytorch website.
To obtain the results for Bayesian Linear Regression run:
python run_lin.pyThe coefficients for each fold are written to ./coeff/linear/. The figures are saved in ./figures/linear/NAME/. NAME is the name of the property (density, viscosity, flash_point).
Similarly, for polynomial regression, run:
python run_poly.pyThe coefficients for each fold are written to ./coeff/poly/. The figures are saved in ./figures/poly/NAME/. NAME is the name of the property (density, viscosity, flash_point).
To obtain the results for Bayesian Neural Networks run:
python run_bnn.pyThe figures are saved in ./figures/bnn/NAME/. NAME is the name of the property (density, viscosity, flash_point). To reduce the effect of BNN stochasticity, the model was trained and tested 200 times, and the average of metrics and SHAP values was reported in the manuscript. The metrics and SHAP values for each iteration are written to ./coeff/bnn. The mean and standard deviation of metrics are written in the last two cells of ./coeff/bnn/NAME_mape.csv files.
The BNN model used in torchbnn is stochastic, and different results will be obtained for each training and testing. The code runs the training and testing 200 times and calculates the average of the metrics to mitigate the effect of model stochasticity. Accordingly, it may not be possible to reproduce the exact numbers that appear in the manuscript, but the results will be close.
To produce Figure 2, run the following:
python run_visual.pyTo produce the histograms in Figures 4, 8, and 12, run the following:
python run_hist.pyPlease note that the values for column y_pred in ./data/hist/ and MAPE are not updated for this dataset. Currently, the original values used in the paper are still in place. The MAPE values can be updated by updating mape variable in run_hist.py.