Jen Arriaza

Logo

Sr. Data Scientist | Machine Learning Engineer
NY Metro

I build predictive models and automation tools for complex engineering systems.


Contact

Back

Predicting Cost & Demand Fluctuation in Supply Chains

View Repository

Note: This portfolio section is currently in progress. Please see the project repository linked above for current status.

Project Summary

In the dynamic and cost-sensitive world of manufacturing, accurately forecasting raw materials costs is critical for maintaining profitability and operational efficiency. This project leverages Facebook’s Prophet time series forecasting model to predict raw materials costs, incorporating inflation rate as an exogenous regressor. By analyzing historical production and cost data, the model aims to provide actionable insights for budgeting, procurement, and cost management.

Results: The Prophet model achieved a Mean Absolute Error (MAE) of 0.72 and a Root Mean Squared Error (RMSE) of 0.92, indicating moderate predictive accuracy. However, critical model performance metrics Mean Absolute Percentage Error (MAPE) and R² of 0.02 suggest significant challenges in model performance. Current results highlight the need for model refinement and additional feature engineering to maintain model robustness in the future.

Project Details: Exploratory Data Analysis

Data Collection and Preprocessing: The dataset used in this project consists of historical production and cost data, including metrics such as production hours, workforce size, machine efficiency, and raw materials costs. The data was sourced from a manufacturing facility and underwent rigorous cleaning, normalization, and preprocessing to ensure accuracy and consistency. Below is a sample visualization of the raw materials cost vs. inflation rate trends over time:

Data Source: Federal Reserve Economic Data

Insights from EDA

Cost Variability: Raw materials costs exhibit significant variability, with fluctuations driven by factors such as supplier pricing, production volume, and inflation rates.

Inflation Impact: The inflation rate shows a strong correlation with raw materials costs, indicating its importance as an exogenous regressor in the forecasting model.

Production Efficiency: Metrics such as machine efficiency and production volume per hour show potential relationships with raw materials costs, suggesting opportunities for further feature engineering.

Seasonal Trends: While the dataset does not explicitly capture seasonal trends, the inclusion of time-based features (e.g., timestamp hour) may help uncover hidden patterns.

Predictive Modeling with Prophet


The forecast reflects the seasonal decomposition results that indicate raw materials cost has trended down, with weekly seasonal peaks observed in the last year.

Model Configuration:
Yearly Seasonality: Auto
Weekly Seasonality: Auto
Daily Seasonality: Auto
Exogenous Regressor: Inflation Rate
Initial Training Period: 90 days
Cross-Validation Period: 30 days
Forecast Horizon: 30 days

Performance Evaluation:

Real-time Monitoring System: To operationalize the model, we developed a real-time monitoring dashboard that provides early warnings of potential cost fluctuations. The dashboard integrates with existing procurement and budgeting systems, enabling stakeholders to take proactive measures such as adjusting procurement strategies or renegotiating supplier contracts.

Integration with Maintenance Protocols: Upon successful validation, the model was integrated into the company’s procurement and budgeting protocols. Key outcomes include:

References: See Repository