Machine Learning Approach to Predicting Crude Oil Viscosity
Dylan Aygun
International Community School
Crude oil viscosity plays a critical role in refinery configuration, pipeline transport efficiency, and commercial crude valuation. However, laboratory-based viscosity measurements often require several hours or even days to complete, which can delay operational and trading decisions. In this study, I developed a machine learning model to predict viscosity at 40 °C using five measurable crude oil properties: density, paraffin content, aromatic content, pour point, and vanadium concentration. I focused specifically on light and medium crude oils because heavy crudes frequently contain inconsistent compositional data, which complicates model training and validation. After compiling and cleaning a dataset of 52 samples from publicly available sources, I trained a gradient-boosted regression model using an 75/25 train-test split. Initial linear regression attempts did not adequately capture nonlinear interactions between density and compositional features, which led me to adopt a gradient boosting approach. Overall, the model showed strong performance relative to the dataset size. Feature importance and SHAP analysis indicated that density and aromatic content were the most influential predictors, with viscosity increasing sharply once density exceeded approximately 0.86 g/cc. Although the dataset size was limited and restricted to light and medium crude types, the results suggest that selective feature engineering combined with nonlinear modeling can provide a practical and computationally efficient alternative to traditional laboratory testing.

