View rendered notebook in nbviewer here
I'm excited to share a recent project where I've developed a Linear Regression Model to predict the Cushing, OK WTI Spot Price FOB. This work combines data analysis and energy economics, providing insights into the future of crude oil prices.
The model leverages data from the U.S. Energy Information Administration, focusing on weekly U.S. crude oil supply. My approach involved using Pandas for data manipulation, Plotly Express for visualization, and Scikit-learn for building the regression model.
After thorough data cleaning and preparation, I focused on identifying key features that influence crude oil prices. The model's performance, indicated by an R-squared of 0.85, shows a strong correlation between the features and the target price.
The visualizations created help in understanding the model's predictions compared to actual prices. The insights from the regression coefficients were particularly interesting, shedding light on the impact of different variables on oil pricing.
The "Actual vs Predicted Results" plot visually compares the real-world crude oil prices with those forecasted by the linear regression model. Deviations from the diagonal line, which represents perfect prediction, indicate the areas where the model overestimates or underestimates the actual prices.
The "Residuals vs Predicted Prices" plot in this context visually represents the differences (residuals) between the actual and predicted crude oil prices. This plot helps in identifying patterns in the prediction errors, indicating whether the model consistently overestimates or underestimates at certain price levels.